mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-12 09:35:26 +02:00
That just leaves the big ol' core. Largely ignore Compat as it is very temporary.
This commit is contained in:
@@ -9,14 +9,8 @@ public class Essentials extends JavaPlugin
|
|||||||
@Override
|
@Override
|
||||||
public void onEnable()
|
public void onEnable()
|
||||||
{
|
{
|
||||||
Bukkit.getLogger().info("You can remove this compatibility plugin, when all plugins are updated to Essentials 3");
|
Bukkit.getLogger().info("You can remove this compatibility plugin, when all plugins are updated to Essentials-3");
|
||||||
//TODO: Update files to new 3.0 format
|
//TODO: Update files to new 3.0 format
|
||||||
//TODO: Move Eco Api here
|
//TODO: Move Eco Api here
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onDisable()
|
|
||||||
{
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -386,7 +386,6 @@ public class EssentialsUpgrade
|
|||||||
* ((Number)vals.get(4)).floatValue())); } } } } usersFile.renameTo(new File(usersFile.getAbsolutePath() + ".old"));
|
* ((Number)vals.get(4)).floatValue())); } } } } usersFile.renameTo(new File(usersFile.getAbsolutePath() + ".old"));
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private void convertWarps()
|
private void convertWarps()
|
||||||
{
|
{
|
||||||
final File warpsFolder = new File(ess.getDataFolder(), "warps");
|
final File warpsFolder = new File(ess.getDataFolder(), "warps");
|
||||||
|
@@ -4,8 +4,7 @@ import com.earth2me.essentials.utils.Util;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instead of using this api directly, we recommend to use the register plugin:
|
* Instead of using this api directly, we recommend to use the register plugin: http://bit.ly/RegisterMethod
|
||||||
* http://bit.ly/RegisterMethod
|
|
||||||
*/
|
*/
|
||||||
public final class Economy
|
public final class Economy
|
||||||
{
|
{
|
||||||
@@ -17,6 +16,7 @@ public final class Economy
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the balance of a user
|
* Returns the balance of a user
|
||||||
|
*
|
||||||
* @param name Name of the user
|
* @param name Name of the user
|
||||||
* @return balance
|
* @return balance
|
||||||
* @throws UserDoesNotExistException
|
* @throws UserDoesNotExistException
|
||||||
@@ -32,6 +32,7 @@ public final class Economy
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the balance of a user
|
* Sets the balance of a user
|
||||||
|
*
|
||||||
* @param name Name of the user
|
* @param name Name of the user
|
||||||
* @param balance The balance you want to set
|
* @param balance The balance you want to set
|
||||||
* @throws UserDoesNotExistException If a user by that name does not exists
|
* @throws UserDoesNotExistException If a user by that name does not exists
|
||||||
@@ -48,6 +49,7 @@ public final class Economy
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds money to the balance of a user
|
* Adds money to the balance of a user
|
||||||
|
*
|
||||||
* @param name Name of the user
|
* @param name Name of the user
|
||||||
* @param amount The money you want to add
|
* @param amount The money you want to add
|
||||||
* @throws UserDoesNotExistException If a user by that name does not exists
|
* @throws UserDoesNotExistException If a user by that name does not exists
|
||||||
@@ -61,6 +63,7 @@ public final class Economy
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Substracts money from the balance of a user
|
* Substracts money from the balance of a user
|
||||||
|
*
|
||||||
* @param name Name of the user
|
* @param name Name of the user
|
||||||
* @param amount The money you want to substract
|
* @param amount The money you want to substract
|
||||||
* @throws UserDoesNotExistException If a user by that name does not exists
|
* @throws UserDoesNotExistException If a user by that name does not exists
|
||||||
@@ -74,6 +77,7 @@ public final class Economy
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Divides the balance of a user by a value
|
* Divides the balance of a user by a value
|
||||||
|
*
|
||||||
* @param name Name of the user
|
* @param name Name of the user
|
||||||
* @param value The balance is divided by this value
|
* @param value The balance is divided by this value
|
||||||
* @throws UserDoesNotExistException If a user by that name does not exists
|
* @throws UserDoesNotExistException If a user by that name does not exists
|
||||||
@@ -87,6 +91,7 @@ public final class Economy
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Multiplies the balance of a user by a value
|
* Multiplies the balance of a user by a value
|
||||||
|
*
|
||||||
* @param name Name of the user
|
* @param name Name of the user
|
||||||
* @param value The balance is multiplied by this value
|
* @param value The balance is multiplied by this value
|
||||||
* @throws UserDoesNotExistException If a user by that name does not exists
|
* @throws UserDoesNotExistException If a user by that name does not exists
|
||||||
@@ -100,6 +105,7 @@ public final class Economy
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Resets the balance of a user to the starting balance
|
* Resets the balance of a user to the starting balance
|
||||||
|
*
|
||||||
* @param name Name of the user
|
* @param name Name of the user
|
||||||
* @throws UserDoesNotExistException If a user by that name does not exists
|
* @throws UserDoesNotExistException If a user by that name does not exists
|
||||||
* @throws NoLoanPermittedException If the user is not allowed to have a negative balance
|
* @throws NoLoanPermittedException If the user is not allowed to have a negative balance
|
||||||
@@ -148,6 +154,7 @@ public final class Economy
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Test if the user has a negative balance
|
* Test if the user has a negative balance
|
||||||
|
*
|
||||||
* @param name Name of the user
|
* @param name Name of the user
|
||||||
* @return true, if the user has a negative balance
|
* @return true, if the user has a negative balance
|
||||||
* @throws UserDoesNotExistException If a user by that name does not exists
|
* @throws UserDoesNotExistException If a user by that name does not exists
|
||||||
@@ -158,8 +165,8 @@ public final class Economy
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Formats the amount of money like all other Essentials functions.
|
* Formats the amount of money like all other Essentials functions. Example: $100000 or $12345.67
|
||||||
* Example: $100000 or $12345.67
|
*
|
||||||
* @param amount The amount of money
|
* @param amount The amount of money
|
||||||
* @return Formatted money
|
* @return Formatted money
|
||||||
*/
|
*/
|
||||||
@@ -174,6 +181,7 @@ public final class Economy
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Test if a player exists to avoid the UserDoesNotExistException
|
* Test if a player exists to avoid the UserDoesNotExistException
|
||||||
|
*
|
||||||
* @param name Name of the user
|
* @param name Name of the user
|
||||||
* @return true, if the user exists
|
* @return true, if the user exists
|
||||||
*/
|
*/
|
||||||
@@ -188,6 +196,7 @@ public final class Economy
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Test if a player is a npc
|
* Test if a player is a npc
|
||||||
|
*
|
||||||
* @param name Name of the player
|
* @param name Name of the player
|
||||||
* @return true, if it's a npc
|
* @return true, if it's a npc
|
||||||
* @throws UserDoesNotExistException
|
* @throws UserDoesNotExistException
|
||||||
@@ -203,6 +212,7 @@ public final class Economy
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates dummy files for a npc, if there is no player yet with that name.
|
* Creates dummy files for a npc, if there is no player yet with that name.
|
||||||
|
*
|
||||||
* @param name Name of the player
|
* @param name Name of the player
|
||||||
* @return true, if a new npc was created
|
* @return true, if a new npc was created
|
||||||
*/
|
*/
|
||||||
@@ -217,6 +227,7 @@ public final class Economy
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes a user, if it is marked as npc.
|
* Deletes a user, if it is marked as npc.
|
||||||
|
*
|
||||||
* @param name Name of the player
|
* @param name Name of the player
|
||||||
* @throws UserDoesNotExistException
|
* @throws UserDoesNotExistException
|
||||||
*/
|
*/
|
||||||
|
@@ -6,7 +6,9 @@ import java.util.HashMap;
|
|||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public class ChatPermissions {
|
|
||||||
|
public class ChatPermissions
|
||||||
|
{
|
||||||
private static Map<String, IPermission> permissions = new HashMap<String, IPermission>();
|
private static Map<String, IPermission> permissions = new HashMap<String, IPermission>();
|
||||||
|
|
||||||
public static IPermission getPermission(final String groupName)
|
public static IPermission getPermission(final String groupName)
|
||||||
@@ -14,7 +16,7 @@ public class ChatPermissions {
|
|||||||
IPermission perm = permissions.get(groupName);
|
IPermission perm = permissions.get(groupName);
|
||||||
if (perm == null)
|
if (perm == null)
|
||||||
{
|
{
|
||||||
perm = new BasePermission("essentials.chat.",groupName.toLowerCase(Locale.ENGLISH));
|
perm = new BasePermission("essentials.chat.", groupName.toLowerCase(Locale.ENGLISH));
|
||||||
permissions.put(groupName, perm);
|
permissions.put(groupName, perm);
|
||||||
}
|
}
|
||||||
return perm;
|
return perm;
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
package com.earth2me.essentials.chat;
|
package com.earth2me.essentials.chat;
|
||||||
|
|
||||||
import com.earth2me.essentials.economy.Trade;
|
|
||||||
import com.earth2me.essentials.api.IEssentials;
|
import com.earth2me.essentials.api.IEssentials;
|
||||||
import com.earth2me.essentials.api.IUser;
|
import com.earth2me.essentials.api.IUser;
|
||||||
|
import com.earth2me.essentials.economy.Trade;
|
||||||
|
|
||||||
|
|
||||||
public class ChatStore
|
public class ChatStore
|
||||||
|
@@ -45,9 +45,4 @@ public class EssentialsChat extends JavaPlugin
|
|||||||
final EssentialsLocalChatEventListener localChatListener = new EssentialsLocalChatEventListener(getServer(), ess);
|
final EssentialsLocalChatEventListener localChatListener = new EssentialsLocalChatEventListener(getServer(), ess);
|
||||||
pluginManager.registerEvents(localChatListener, this);
|
pluginManager.registerEvents(localChatListener, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onDisable()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -98,6 +98,7 @@ public class EssentialsLocalChatEvent extends Event implements Cancellable
|
|||||||
return parentEvent;
|
return parentEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public HandlerList getHandlers()
|
public HandlerList getHandlers()
|
||||||
{
|
{
|
||||||
return handlers;
|
return handlers;
|
||||||
|
@@ -3,8 +3,6 @@ package com.earth2me.essentials.chat;
|
|||||||
import static com.earth2me.essentials.I18n._;
|
import static com.earth2me.essentials.I18n._;
|
||||||
import com.earth2me.essentials.api.IEssentials;
|
import com.earth2me.essentials.api.IEssentials;
|
||||||
import com.earth2me.essentials.api.IUser;
|
import com.earth2me.essentials.api.IUser;
|
||||||
import com.earth2me.essentials.permissions.Permissions;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
@@ -18,7 +16,6 @@ public class EssentialsLocalChatEventListener implements Listener
|
|||||||
{
|
{
|
||||||
protected transient IEssentials ess;
|
protected transient IEssentials ess;
|
||||||
protected final transient Server server;
|
protected final transient Server server;
|
||||||
private static final Logger LOGGER = Logger.getLogger("Minecraft");
|
|
||||||
|
|
||||||
public EssentialsLocalChatEventListener(final Server server, final IEssentials ess)
|
public EssentialsLocalChatEventListener(final Server server, final IEssentials ess)
|
||||||
{
|
{
|
||||||
|
@@ -7,6 +7,7 @@ import java.io.File;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
|
|
||||||
public class ConfigHolder extends AsyncStorageObjectHolder<GeoIP>
|
public class ConfigHolder extends AsyncStorageObjectHolder<GeoIP>
|
||||||
{
|
{
|
||||||
private final transient Plugin geoip;
|
private final transient Plugin geoip;
|
||||||
@@ -27,13 +28,10 @@ public class ConfigHolder extends AsyncStorageObjectHolder<GeoIP>
|
|||||||
@Override
|
@Override
|
||||||
public void finishRead()
|
public void finishRead()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void finishWrite()
|
public void finishWrite()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -9,15 +9,6 @@ import org.bukkit.plugin.java.JavaPlugin;
|
|||||||
|
|
||||||
public class EssentialsGeoIP extends JavaPlugin
|
public class EssentialsGeoIP extends JavaPlugin
|
||||||
{
|
{
|
||||||
public EssentialsGeoIP()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onDisable()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable()
|
public void onEnable()
|
||||||
{
|
{
|
||||||
@@ -27,7 +18,8 @@ public class EssentialsGeoIP extends JavaPlugin
|
|||||||
{
|
{
|
||||||
getLogger().log(Level.WARNING, _("versionMismatchAll"));
|
getLogger().log(Level.WARNING, _("versionMismatchAll"));
|
||||||
}
|
}
|
||||||
if (!ess.isEnabled()) {
|
if (!ess.isEnabled())
|
||||||
|
{
|
||||||
this.setEnabled(false);
|
this.setEnabled(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user