mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-06 20:56:41 +00:00
Refactor confirmation
This commit is contained in:
@ -375,39 +375,6 @@ public interface Player extends Entity, Actor {
|
||||
}
|
||||
}
|
||||
|
||||
default int cancel(boolean close) {
|
||||
int cancelled = 0;
|
||||
|
||||
for (Request request : Request.getAll()) {
|
||||
EditSession editSession = request.getEditSession();
|
||||
if (editSession != null) {
|
||||
Player player = editSession.getPlayer();
|
||||
if (equals(player)) {
|
||||
editSession.cancel();
|
||||
cancelled++;
|
||||
}
|
||||
}
|
||||
}
|
||||
VirtualWorld world = getSession().getVirtualWorld();
|
||||
if (world != null) {
|
||||
if (close) {
|
||||
try {
|
||||
world.close(false);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
else {
|
||||
try {
|
||||
world.close(false);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
return cancelled;
|
||||
}
|
||||
|
||||
void sendTitle(String title, String sub);
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user