mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-20 21:41:32 +02:00
Updated all modules to new api, some settings are still missing
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package com.earth2me.essentials.chat;
|
||||
|
||||
import static com.earth2me.essentials.I18n._;
|
||||
import com.earth2me.essentials.IEssentials;
|
||||
import com.earth2me.essentials.api.IEssentials;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentSkipListMap;
|
||||
|
@@ -2,9 +2,9 @@ package com.earth2me.essentials.chat;
|
||||
|
||||
import com.earth2me.essentials.ChargeException;
|
||||
import static com.earth2me.essentials.I18n._;
|
||||
import com.earth2me.essentials.IEssentials;
|
||||
import com.earth2me.essentials.api.IEssentials;
|
||||
import com.earth2me.essentials.Trade;
|
||||
import com.earth2me.essentials.User;
|
||||
import com.earth2me.essentials.api.IUser;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Logger;
|
||||
import org.bukkit.Location;
|
||||
@@ -53,7 +53,7 @@ public abstract class EssentialsChatPlayer extends PlayerListener
|
||||
}
|
||||
}
|
||||
|
||||
final User user = ess.getUser(event.getPlayer());
|
||||
final IUser user = ess.getUser(event.getPlayer());
|
||||
if (!isAffordableFor(user, command))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
@@ -106,7 +106,7 @@ public abstract class EssentialsChatPlayer extends PlayerListener
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void sendLocalChat(final User sender, final long radius, final PlayerChatEvent event)
|
||||
protected void sendLocalChat(final IUser sender, final long radius, final PlayerChatEvent event)
|
||||
{
|
||||
event.setCancelled(true);
|
||||
logger.info(_("localFormat", sender.getName(), event.getMessage()));
|
||||
@@ -116,9 +116,9 @@ public abstract class EssentialsChatPlayer extends PlayerListener
|
||||
for (Player onlinePlayer : server.getOnlinePlayers())
|
||||
{
|
||||
String type = "[L]";
|
||||
final User user = ess.getUser(onlinePlayer);
|
||||
final IUser user = ess.getUser(onlinePlayer);
|
||||
//TODO: remove reference to op
|
||||
if (user.isIgnoredPlayer(sender.getName()) && !sender.isOp())
|
||||
if (user.isIgnoringPlayer(sender.getName()) && !sender.isOp())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
package com.earth2me.essentials.chat;
|
||||
|
||||
import com.earth2me.essentials.ChargeException;
|
||||
import com.earth2me.essentials.IEssentials;
|
||||
import com.earth2me.essentials.User;
|
||||
import com.earth2me.essentials.api.IEssentials;
|
||||
import com.earth2me.essentials.api.IUser;
|
||||
import java.util.Map;
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.event.player.PlayerChatEvent;
|
||||
@@ -37,7 +37,7 @@ public class EssentialsChatPlayerListenerHighest extends EssentialsChatPlayer
|
||||
/**
|
||||
* This file should handle charging the user for the action before returning control back
|
||||
*/
|
||||
final User user = ess.getUser(event.getPlayer());
|
||||
final IUser user = ess.getUser(event.getPlayer());
|
||||
|
||||
try
|
||||
{
|
||||
@@ -45,7 +45,7 @@ public class EssentialsChatPlayerListenerHighest extends EssentialsChatPlayer
|
||||
}
|
||||
catch (ChargeException e)
|
||||
{
|
||||
ess.showError(user, e, charge);
|
||||
ess.getCommandHandler().showCommandError(user, charge, e);
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package com.earth2me.essentials.chat;
|
||||
|
||||
import com.earth2me.essentials.IEssentials;
|
||||
import com.earth2me.essentials.User;
|
||||
import com.earth2me.essentials.api.IEssentials;
|
||||
import com.earth2me.essentials.api.IUser;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import org.bukkit.Server;
|
||||
@@ -28,7 +28,7 @@ public class EssentialsChatPlayerListenerLowest extends EssentialsChatPlayer
|
||||
/**
|
||||
* This listener should apply the general chat formatting only...then return control back the event handler
|
||||
*/
|
||||
final User user = ess.getUser(event.getPlayer());
|
||||
final IUser user = ess.getUser(event.getPlayer());
|
||||
if (user.isAuthorized("essentials.chat.color"))
|
||||
{
|
||||
event.setMessage(event.getMessage().replaceAll("&([0-9a-f])", "\u00a7$1"));
|
||||
|
@@ -1,8 +1,8 @@
|
||||
package com.earth2me.essentials.chat;
|
||||
|
||||
import static com.earth2me.essentials.I18n._;
|
||||
import com.earth2me.essentials.IEssentials;
|
||||
import com.earth2me.essentials.User;
|
||||
import com.earth2me.essentials.api.IEssentials;
|
||||
import com.earth2me.essentials.api.IUser;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import org.bukkit.Server;
|
||||
@@ -48,7 +48,7 @@ public class EssentialsChatPlayerListenerNormal extends EssentialsChatPlayer
|
||||
return;
|
||||
}
|
||||
radius *= radius;
|
||||
final User user = ess.getUser(event.getPlayer());
|
||||
final IUser user = ess.getUser(event.getPlayer());
|
||||
|
||||
if (event.getMessage().length() > 0 && chatType.length() > 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user