mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-12 09:35:26 +02:00
Code cleanup; deprecated /nuble
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1271 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
@@ -1,21 +0,0 @@
|
|||||||
package com.earth2me.essentials.commands;
|
|
||||||
|
|
||||||
import org.bukkit.Server;
|
|
||||||
import com.earth2me.essentials.Essentials;
|
|
||||||
import com.earth2me.essentials.User;
|
|
||||||
|
|
||||||
|
|
||||||
public class Commandnuble extends EssentialsCommand
|
|
||||||
{
|
|
||||||
public Commandnuble()
|
|
||||||
{
|
|
||||||
super("nuble");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void run(Server server, Essentials parent, User user, String commandLabel, String[] args) throws Exception
|
|
||||||
{
|
|
||||||
user.charge(this);
|
|
||||||
user.sendMessage("§7Flight is allowed on this server.");
|
|
||||||
}
|
|
||||||
}
|
|
@@ -5,9 +5,10 @@ import com.earth2me.essentials.User;
|
|||||||
|
|
||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
|
|
||||||
|
|
||||||
public class Commandweather extends EssentialsCommand
|
public class Commandweather extends EssentialsCommand
|
||||||
{
|
{
|
||||||
public Commandweather()
|
public Commandweather()
|
||||||
{
|
{
|
||||||
super("weather");
|
super("weather");
|
||||||
}
|
}
|
||||||
@@ -15,56 +16,41 @@ public class Commandweather extends EssentialsCommand
|
|||||||
@Override
|
@Override
|
||||||
public void run(Server server, Essentials parent, User user, String commandLabel, String[] args) throws Exception
|
public void run(Server server, Essentials parent, User user, String commandLabel, String[] args) throws Exception
|
||||||
{
|
{
|
||||||
switch (args.length)
|
switch (args.length)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
if (user.isAuthorized("essentials.weather"))
|
user.sendMessage("§cUsage: /" + commandLabel + " <storm/sun> [duration]");
|
||||||
{
|
break;
|
||||||
user.sendMessage("§cUsage: /" + commandLabel + " <storm/sun> [duration]");
|
case 1:
|
||||||
break;
|
if (args[0].equalsIgnoreCase("storm"))
|
||||||
}
|
{
|
||||||
user.sendMessage("§cYou are not allowed to change the weather");
|
user.getWorld().setStorm(true);
|
||||||
break;
|
user.sendMessage("§7You set the weather in your world to storm");
|
||||||
case 1:
|
break;
|
||||||
if (user.isAuthorized("essentials.weather"))
|
}
|
||||||
{
|
if (args[0].equalsIgnoreCase("sun"))
|
||||||
if(args[0].equalsIgnoreCase("storm"))
|
{
|
||||||
{
|
user.getWorld().setStorm(false);
|
||||||
user.getWorld().setStorm(true);
|
user.sendMessage("§7You set the weather in your world to sun");
|
||||||
user.sendMessage("§7You set the weather in your world to storm");
|
break;
|
||||||
break;
|
}
|
||||||
}
|
user.sendMessage("§cUsage: /" + commandLabel + " <storm/sun> [duration]");
|
||||||
if(args[0].equalsIgnoreCase("sun"))
|
case 2:
|
||||||
{
|
if (args[0].equalsIgnoreCase("storm"))
|
||||||
user.getWorld().setStorm(false);
|
{
|
||||||
user.sendMessage("§7You set the weather in your world to sun");
|
user.getWorld().setStorm(true);
|
||||||
break;
|
user.getWorld().setWeatherDuration(Integer.parseInt(args[1]) * 20);
|
||||||
}
|
user.sendMessage("§7You set the weather in your world to storm for " + args[1] + " seconds");
|
||||||
user.sendMessage("§cUsage: /" + commandLabel + " <storm/sun> [duration]");
|
break;
|
||||||
}
|
}
|
||||||
user.sendMessage("§cYou are not allowed to change the weather");
|
if (args[0].equalsIgnoreCase("sun"))
|
||||||
break;
|
{
|
||||||
case 2:
|
user.getWorld().setStorm(false);
|
||||||
if (user.isAuthorized("essentials.weather"))
|
user.getWorld().setWeatherDuration(Integer.parseInt(args[1]) * 20);
|
||||||
{
|
user.sendMessage("§7You set the weather in your world to sun for " + args[1] + " seconds");
|
||||||
if(args[0].equalsIgnoreCase("storm"))
|
break;
|
||||||
{
|
}
|
||||||
user.getWorld().setStorm(true);
|
user.sendMessage("§cUsage: /" + commandLabel + " <storm/sun> [duration]");
|
||||||
user.getWorld().setWeatherDuration(Integer.parseInt(args[1]) * 20);
|
}
|
||||||
user.sendMessage("§7You set the weather in your world to storm for " + args[1] + " seconds");
|
}
|
||||||
break;
|
|
||||||
}
|
|
||||||
if(args[0].equalsIgnoreCase("sun"))
|
|
||||||
{
|
|
||||||
user.getWorld().setStorm(false);
|
|
||||||
user.getWorld().setWeatherDuration(Integer.parseInt(args[1]) * 20);
|
|
||||||
user.sendMessage("§7You set the weather in your world to sun for " + args[1] + " seconds");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
user.sendMessage("§cUsage: /" + commandLabel + " <storm/sun> [duration]");
|
|
||||||
}
|
|
||||||
user.sendMessage("§cYou are not allowed to change the weather");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -168,9 +168,6 @@ commands:
|
|||||||
description: Change your nickname or that of another player.
|
description: Change your nickname or that of another player.
|
||||||
usage: /<command> <player> [nickname|off]
|
usage: /<command> <player> [nickname|off]
|
||||||
aliases: [enick]
|
aliases: [enick]
|
||||||
nuble:
|
|
||||||
description: Used by Nuble to request permission for takeoff.
|
|
||||||
usage: /<command> identify [id]
|
|
||||||
pay:
|
pay:
|
||||||
description: Pays another player from your balance
|
description: Pays another player from your balance
|
||||||
usage: /<command> [player] [amount]
|
usage: /<command> [player] [amount]
|
||||||
|
Reference in New Issue
Block a user