我真的需要帮助。 我通过谷歌搜索在网上尝试了很多建议,但我没有得到太多。我试图提出的一些解决方案是:
public LunarCore plugin = new LunarCore();
但我不确定这是否有效。 这是我的代码
IconMenu menu = new IconMenu("Idle Menu", 9, new IconMenu.OptionClickEventHandler() {
@Override
public void onOptionClick(IconMenu.OptionClickEvent event) {
event.getPlayer().sendMessage("You have chosen " + event.getName());
event.setWillClose(true);
}
}, plugin)
.setOption(3, new ItemStack(Material.GOLD_INGOT, 1), "Shop")
显然是在
}
}, plugin)
“插件”
答案 0 :(得分:1)
如果这是与您的主班级分开的班级,请尝试
chrome.bluetooth.getDevices(function(devices) {
for (var i = 0; i < devices.length; i++) {
//Displaying device names
console.log(i+": "+devices[i].name);
}
//uuid for a specific device
var uuid = "00001200-0000-1000-8000-00805f9b34fb";
// var uuid = devices[4].uuid;
var onConnectedCallback = function() {
if (chrome.runtime.lastError) {
console.log("Connection failed: " + chrome.runtime.lastError.message);
} else {
// Profile implementation here.
}
};
chrome.bluetoothSocket.create(function(createInfo) {
chrome.bluetoothSocket.connect(createInfo.socketId,
devices[4].address, uuid, onConnectedCallback);
console.log(createInfo);
chrome.bluetoothSocket.onRecieve.addListener(function(receiveInfo) {
if (receiveInfo.socketId != socketId)
return;
console.log(receiveInfo);
});
});
});
然后传递&#34;这个&#34;作为通过主类访问类的参数