mirror of
https://github.com/kaboomserver/extras.git
synced 2025-08-06 04:23:21 +00:00
Fix code style violations
This commit is contained in:
parent
8fc5601de8
commit
d033875659
1 changed files with 5 additions and 4 deletions
|
@ -30,7 +30,7 @@ public final class PlayerMessaging implements PluginMessageListener {
|
||||||
|
|
||||||
private final Main plugin;
|
private final Main plugin;
|
||||||
|
|
||||||
public PlayerMessaging(Main plugin) {
|
public PlayerMessaging(final Main plugin) {
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
|
|
||||||
SCHEDULED_EXECUTOR_SERVICE.scheduleAtFixedRate(() -> {
|
SCHEDULED_EXECUTOR_SERVICE.scheduleAtFixedRate(() -> {
|
||||||
|
@ -61,7 +61,7 @@ public final class PlayerMessaging implements PluginMessageListener {
|
||||||
|
|
||||||
private final Map<String, Set<Player>> listening = Collections.synchronizedMap(new HashMap<>());
|
private final Map<String, Set<Player>> listening = Collections.synchronizedMap(new HashMap<>());
|
||||||
|
|
||||||
private static String readString(DataInput dataInput) throws IOException {
|
private static String readString(final DataInput dataInput) throws IOException {
|
||||||
final byte[] buf = new byte[255];
|
final byte[] buf = new byte[255];
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
|
|
||||||
|
@ -92,7 +92,8 @@ public final class PlayerMessaging implements PluginMessageListener {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleUnregister(final Player player, final DataInput input) throws IOException {
|
private void handleUnregister(final Player player,
|
||||||
|
final DataInput input) throws IOException {
|
||||||
this.listening.computeIfPresent(readString(input), (k, v) -> {
|
this.listening.computeIfPresent(readString(input), (k, v) -> {
|
||||||
v.remove(player);
|
v.remove(player);
|
||||||
return v;
|
return v;
|
||||||
|
@ -185,7 +186,7 @@ public final class PlayerMessaging implements PluginMessageListener {
|
||||||
new DataInputStream(new FastByteArrayInputStream(bytes))
|
new DataInputStream(new FastByteArrayInputStream(bytes))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} catch (Exception ignored) {
|
} catch (final Exception ignored) {
|
||||||
player.sendMessage(ERROR);
|
player.sendMessage(ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue