Adjustments
This commit is contained in:
parent
28629dc054
commit
1f75e7cbf3
2 changed files with 5 additions and 5 deletions
|
@ -1,23 +1,22 @@
|
||||||
package buttondevteam.alipresents.components.hotfix.hotfixes;
|
package buttondevteam.alipresents.components.hotfix.hotfixes;
|
||||||
|
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.Server;
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
public class CreativeKillLoop extends BukkitRunnable implements Listener {
|
public class CreativeKillLoop extends BukkitRunnable implements Listener {
|
||||||
private Server server;
|
private JavaPlugin plugin;
|
||||||
|
|
||||||
public CreativeKillLoop(JavaPlugin plugin){
|
public CreativeKillLoop(JavaPlugin plugin){
|
||||||
this.server = plugin.getServer();
|
this.plugin = plugin;
|
||||||
this.runTaskTimer(plugin, 40, 40);
|
this.runTaskTimer(plugin, 40, 40);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
for (Player player : server.getOnlinePlayers()){
|
for (Player player : plugin.getServer().getOnlinePlayers()){
|
||||||
if(player.getGameMode() != GameMode.SURVIVAL && player.getWorld().getName() == "World" && player.isOp() == false){
|
if(player.getGameMode() != GameMode.SURVIVAL && player.getWorld().getName() == "World" && player.isOp() == false){
|
||||||
player.sendMessage("[Hotfix] Every Gamemode other than survival is disabled in the new world!");
|
player.sendMessage("[Hotfix] Every Gamemode other than survival is disabled in the new world!");
|
||||||
player.setGameMode(GameMode.SURVIVAL);
|
player.setGameMode(GameMode.SURVIVAL);
|
||||||
|
|
|
@ -31,7 +31,8 @@ public class CannonBowSettings extends ModCommand {
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
player.sendMessage("That isn't a valid setting!");
|
player.sendMessage("That isn't a valid setting!");
|
||||||
player.sendMessage("Valid Settings are: ");
|
player.sendMessage("Valid Settings are: speedmultiplier, minforce, fuseticks, recoil");
|
||||||
|
player.sendMessage("Use argument 'display' to disply current settings");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue