mirror of
https://github.com/EssentialsX/Essentials.git
synced 2026-11-08 10:15:18 -05:00
Compare commits
12
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4425d53664 | ||
|
|
ee5e015a63 | ||
|
|
839ce3d526 | ||
|
|
cc06117210 | ||
|
|
5a092f0e99 | ||
|
|
98cd03ac57 | ||
|
|
8761feb93f | ||
|
|
cbd5b6c0f4 | ||
|
|
fec3b61039 | ||
|
|
01530192cf | ||
|
|
64bc8d1133 | ||
|
|
58bebd851c |
No files matched your search
@@ -124,7 +124,7 @@ public class Essentials extends JavaPlugin implements IEssentials
|
||||
LOGGER.log(Level.WARNING, _("versionMismatch", plugin.getDescription().getName()));
|
||||
}
|
||||
}
|
||||
final Matcher versionMatch = Pattern.compile("git-Bukkit-([0-9]+).([0-9]+).([0-9]+)-R[0-9]+-[0-9]+-[0-9a-z]+-b([0-9]+)jnks.*").matcher(getServer().getVersion());
|
||||
final Matcher versionMatch = Pattern.compile("git-Bukkit-([0-9]+).([0-9]+).([0-9]+)-R[0-9]+-(?:[0-9]+-g[0-9a-f]+-)?b([0-9]+)jnks.*").matcher(getServer().getVersion());
|
||||
if (versionMatch.matches())
|
||||
{
|
||||
final int versionNumber = Integer.parseInt(versionMatch.group(4));
|
||||
@@ -294,7 +294,7 @@ public class Essentials extends JavaPlugin implements IEssentials
|
||||
public boolean onCommandEssentials(final CommandSender sender, final Command command, final String commandLabel, final String[] args, final ClassLoader classLoader, final String commandPath, final String permissionPrefix, final IEssentialsModule module)
|
||||
{
|
||||
// Allow plugins to override the command via onCommand
|
||||
if (!getSettings().isCommandOverridden(command.getName()) && !commandLabel.startsWith("e"))
|
||||
if (!getSettings().isCommandOverridden(command.getName()) && (!commandLabel.startsWith("e") || commandLabel.equalsIgnoreCase(command.getName())))
|
||||
{
|
||||
final PluginCommand pc = alternativeCommandsHandler.getAlternative(commandLabel);
|
||||
if (pc != null)
|
||||
|
||||
@@ -313,10 +313,7 @@ public class EssentialsPlayerListener extends PlayerListener
|
||||
}
|
||||
else if (command.startsWith("c:"))
|
||||
{
|
||||
for (Player p : server.getOnlinePlayers())
|
||||
{
|
||||
p.sendMessage(user.getDisplayName() + ":" + command.substring(2));
|
||||
}
|
||||
user.chat(command.substring(2));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -59,7 +59,12 @@ public class Jails extends AsyncStorageObjectHolder<com.earth2me.essentials.sett
|
||||
{
|
||||
throw new Exception(_("jailNotExist"));
|
||||
}
|
||||
return getData().getJails().get(jailName.toLowerCase(Locale.ENGLISH));
|
||||
Location loc = getData().getJails().get(jailName.toLowerCase(Locale.ENGLISH));
|
||||
if (loc == null || loc.getWorld() == null)
|
||||
{
|
||||
throw new Exception(_("jailNotExist"));
|
||||
}
|
||||
return loc;
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -111,7 +116,8 @@ public class Jails extends AsyncStorageObjectHolder<com.earth2me.essentials.sett
|
||||
{
|
||||
if (!(user.getBase() instanceof OfflinePlayer))
|
||||
{
|
||||
user.getTeleport().now(getJail(jail), false, TeleportCause.COMMAND);
|
||||
Location loc = getJail(jail);
|
||||
user.getTeleport().now(loc, false, TeleportCause.COMMAND);
|
||||
}
|
||||
user.setJail(jail);
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ public class Commandbreak extends EssentialsCommand
|
||||
{
|
||||
throw new Exception("You are not allowed to destroy bedrock."); //TODO: Translation
|
||||
}
|
||||
final BlockBreakEvent event = new BlockBreakEvent(block, user);
|
||||
final BlockBreakEvent event = new BlockBreakEvent(block, user.getBase());
|
||||
server.getPluginManager().callEvent(event);
|
||||
if (event.isCancelled())
|
||||
{
|
||||
|
||||
@@ -20,6 +20,10 @@ public class Commandsetwarp extends EssentialsCommand
|
||||
{
|
||||
throw new NotEnoughArgumentsException();
|
||||
}
|
||||
|
||||
if (args[0].matches("[0-9]+")) {
|
||||
throw new NotEnoughArgumentsException();
|
||||
}
|
||||
|
||||
final Location loc = user.getLocation();
|
||||
ess.getWarps().setWarp(args[0], loc);
|
||||
|
||||
@@ -6,10 +6,8 @@ import java.io.FileNotFoundException;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.yaml.snakeyaml.error.YAMLException;
|
||||
|
||||
|
||||
public abstract class AbstractDelayedYamlFileReader<T extends StorageObject> implements Runnable
|
||||
@@ -56,7 +54,7 @@ public abstract class AbstractDelayedYamlFileReader<T extends StorageObject> imp
|
||||
catch (FileNotFoundException ex)
|
||||
{
|
||||
onException();
|
||||
Bukkit.getLogger().log(Level.WARNING, "File not found: " + file.toString());
|
||||
Bukkit.getLogger().log(Level.INFO, "File not found: " + file.toString());
|
||||
}
|
||||
catch (ObjectLoadException ex)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user