Merge pull request 'Nmr. 2' (#242) from adding_billo_april into master
Reviewed-on: #242 Reviewed-by: YoyoNow <jwsteam@nidido.de>
Dieser Commit ist enthalten in:
Commit
de80cbe40b
@ -42,7 +42,8 @@ import org.bukkit.Bukkit;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.time.Instant;
|
||||||
|
import java.time.temporal.ChronoField;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
public class FightSystem extends JavaPlugin {
|
public class FightSystem extends JavaPlugin {
|
||||||
@ -146,7 +147,7 @@ public class FightSystem extends JavaPlugin {
|
|||||||
Fight.getBlueTeam().setSchem(Schematic.getSchemFromDB(Config.PrepareSchemID));
|
Fight.getBlueTeam().setSchem(Schematic.getSchemFromDB(Config.PrepareSchemID));
|
||||||
}
|
}
|
||||||
|
|
||||||
ISAPRIL = new Date().getDay() == 1 && new Date().getMonth() == 4;
|
ISAPRIL = Instant.now().get(ChronoField.DAY_OF_MONTH) == 1 && Instant.now().get(ChronoField.MONTH_OF_YEAR) == 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -94,7 +94,7 @@ public class DenyWorldInteraction implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler()
|
@EventHandler
|
||||||
public void onPlayerJoin(PlayerJoinEvent event) {
|
public void onPlayerJoin(PlayerJoinEvent event) {
|
||||||
if(FightSystem.ISAPRIL) {
|
if(FightSystem.ISAPRIL) {
|
||||||
PacketContainer demo = ProtocolLibrary.getProtocolManager().createPacket(PacketType.Play.Server.GAME_STATE_CHANGE);
|
PacketContainer demo = ProtocolLibrary.getProtocolManager().createPacket(PacketType.Play.Server.GAME_STATE_CHANGE);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren