Hotfixing AutoLoader spam messages due to wrong handling
Dieser Commit ist enthalten in:
Ursprung
f79104e94e
Commit
ea45eb1942
@ -20,7 +20,6 @@ class AutoLoader_15 {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
static void onPlayerInteract(IAutoLoader loader, PlayerInteractEvent event){
|
static void onPlayerInteract(IAutoLoader loader, PlayerInteractEvent event){
|
||||||
loader.print("§cDer AutoLoader ist in der 1.14 noch nicht fertig implementiert", false);
|
loader.print("§cDer AutoLoader ist in der 1.14 noch nicht fertig implementiert", false);
|
||||||
}
|
}
|
||||||
|
48
BauSystem_Main/src/de/steamwar/bausystem/commands/CommandSlow.java
Normale Datei
48
BauSystem_Main/src/de/steamwar/bausystem/commands/CommandSlow.java
Normale Datei
@ -0,0 +1,48 @@
|
|||||||
|
package de.steamwar.bausystem.commands;
|
||||||
|
|
||||||
|
import de.steamwar.bausystem.BauSystem;
|
||||||
|
import de.steamwar.bausystem.Permission;
|
||||||
|
import de.steamwar.bausystem.world.Welt;
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
public class CommandSlow implements CommandExecutor {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
if(!(sender instanceof Player))
|
||||||
|
return false;
|
||||||
|
Player player = (Player) sender;
|
||||||
|
|
||||||
|
if(args.length == 0){
|
||||||
|
player.sendMessage(BauSystem.PREFIX + "§8/§7slow §8[§eTPS§8]");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(Welt.noPermission(player, Permission.world)){
|
||||||
|
player.sendMessage(BauSystem.PREFIX + "§cDu darst hier die Geschwindigkeit nicht verstellen");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
float tps;
|
||||||
|
try{
|
||||||
|
tps = Float.parseFloat(args[0]);
|
||||||
|
}catch(NumberFormatException e){
|
||||||
|
player.sendMessage(BauSystem.PREFIX + "§cDu solltest eine Zahl angeben...");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(tps > 20){
|
||||||
|
player.sendMessage(BauSystem.PREFIX + "§cTut mir leid, aber das ist nicht möglich (TPS > 20)");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(tps == 20){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
@ -140,6 +140,9 @@ public class AutoLoader extends IAutoLoader implements Listener {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
switch(Core.getVersion()){
|
switch(Core.getVersion()){
|
||||||
|
case 15:
|
||||||
|
AutoLoader_15.onPlayerInteract(this, event);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
AutoLoader_12.onPlayerInteract(this, event);
|
AutoLoader_12.onPlayerInteract(this, event);
|
||||||
}
|
}
|
||||||
@ -182,6 +185,8 @@ public class AutoLoader extends IAutoLoader implements Listener {
|
|||||||
@Override
|
@Override
|
||||||
boolean setRedstone(Location location, boolean active){
|
boolean setRedstone(Location location, boolean active){
|
||||||
switch(Core.getVersion()){
|
switch(Core.getVersion()){
|
||||||
|
case 15:
|
||||||
|
return AutoLoader_15.setRedstone(location, active);
|
||||||
default:
|
default:
|
||||||
return AutoLoader_12.setRedstone(location, active);
|
return AutoLoader_12.setRedstone(location, active);
|
||||||
}
|
}
|
||||||
@ -211,6 +216,8 @@ public class AutoLoader extends IAutoLoader implements Listener {
|
|||||||
@Override
|
@Override
|
||||||
public boolean perform() {
|
public boolean perform() {
|
||||||
switch(Core.getVersion()){
|
switch(Core.getVersion()){
|
||||||
|
case 15:
|
||||||
|
return AutoLoader_15.tntPlaceActionPerform(location);
|
||||||
default:
|
default:
|
||||||
return AutoLoader_12.tntPlaceActionPerform(location);
|
return AutoLoader_12.tntPlaceActionPerform(location);
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren