我有这个代码:
public void onPlayerInteract(PlayerInteractEvent event) {
final Action action = event.getAction();
if (action == Action.LEFT_CLICK_BLOCK){
Location l1 = event.getClickedBlock().getLocation();
} else if (action == Action.RIGHT_CLICK_BLOCK) {
Location l2 = event.getClickedBlock().getLocation();
}
Thread t = new Thread() {
@Override
public void run() {
while(true) {
try {
Thread.sleep(1000*60*60);
//Insert code here
} catch (InterruptedException ie) {
}
}
}
};
t.start();
Run Code Online (Sandbox Code Playgroud)
如何访问l1的//insert code here?
| 归档时间: |
|
| 查看次数: |
220 次 |
| 最近记录: |