mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-19 04:52:30 +02:00
Merge of server-layer branch
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>1.5</version>
|
||||
<version>1.7</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
@@ -41,6 +41,7 @@
|
||||
<include>jivesoftware:smack</include>
|
||||
</includes>
|
||||
</artifactSet>
|
||||
<minimizeJar>true</minimizeJar>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
package com.earth2me.essentials.xmpp;
|
||||
package net.ess3.xmpp;
|
||||
|
||||
import net.ess3.api.IUser;
|
||||
import net.ess3.commands.EssentialsCommand;
|
@@ -1,4 +1,4 @@
|
||||
package com.earth2me.essentials.xmpp;
|
||||
package net.ess3.xmpp;
|
||||
|
||||
import net.ess3.Console;
|
||||
import net.ess3.commands.EssentialsCommand;
|
@@ -1,4 +1,4 @@
|
||||
package com.earth2me.essentials.xmpp;
|
||||
package net.ess3.xmpp;
|
||||
|
||||
import net.ess3.commands.EssentialsCommand;
|
||||
import net.ess3.commands.NotEnoughArgumentsException;
|
||||
@@ -37,4 +37,4 @@ public class Commandxmppspy extends EssentialsCommand
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,10 +1,10 @@
|
||||
package com.earth2me.essentials.xmpp;
|
||||
package net.ess3.xmpp;
|
||||
|
||||
import net.ess3.commands.EssentialsCommandHandler;
|
||||
import static net.ess3.I18n._;
|
||||
import net.ess3.api.ICommandHandler;
|
||||
import net.ess3.api.IEssentials;
|
||||
import net.ess3.api.IUser;
|
||||
import net.ess3.commands.EssentialsCommandHandler;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.logging.Level;
|
||||
@@ -36,7 +36,7 @@ public class EssentialsXMPP extends JavaPlugin implements IEssentialsXMPP
|
||||
instance = this;
|
||||
|
||||
final PluginManager pluginManager = getServer().getPluginManager();
|
||||
ess = (IEssentials)pluginManager.getPlugin("Essentials3");
|
||||
ess = (IEssentials)pluginManager.getPlugin("Essentials-3");
|
||||
if (!this.getDescription().getVersion().equals(ess.getDescription().getVersion()))
|
||||
{
|
||||
LOGGER.log(Level.WARNING, _("versionMismatchAll"));
|
||||
@@ -55,8 +55,8 @@ public class EssentialsXMPP extends JavaPlugin implements IEssentialsXMPP
|
||||
|
||||
ess.addReloadListener(users);
|
||||
ess.addReloadListener(xmpp);
|
||||
|
||||
commandHandler = new EssentialsCommandHandler(EssentialsXMPP.class.getClassLoader(), "com.earth2me.essentials.xmpp.Command", "essentials.", ess);
|
||||
|
||||
commandHandler = new EssentialsCommandHandler(EssentialsXMPP.class.getClassLoader(), "net.ess3.xmpp.Command", "essentials.", ess);
|
||||
}
|
||||
|
||||
@Override
|
@@ -1,4 +1,4 @@
|
||||
package com.earth2me.essentials.xmpp;
|
||||
package net.ess3.xmpp;
|
||||
|
||||
import net.ess3.api.IEssentials;
|
||||
import net.ess3.api.IUser;
|
@@ -1,4 +1,4 @@
|
||||
package com.earth2me.essentials.xmpp;
|
||||
package net.ess3.xmpp;
|
||||
|
||||
import net.ess3.api.IUser;
|
||||
import java.util.List;
|
@@ -1,4 +1,4 @@
|
||||
package com.earth2me.essentials.xmpp;
|
||||
package net.ess3.xmpp;
|
||||
|
||||
import net.ess3.api.IReload;
|
||||
import java.io.File;
|
@@ -1,7 +1,8 @@
|
||||
package com.earth2me.essentials.xmpp;
|
||||
package net.ess3.xmpp;
|
||||
|
||||
import net.ess3.api.IReload;
|
||||
import net.ess3.api.IUser;
|
||||
import net.ess3.utils.Util;
|
||||
import java.io.File;
|
||||
import java.util.*;
|
||||
import java.util.logging.Handler;
|
||||
@@ -10,14 +11,14 @@ import java.util.logging.LogRecord;
|
||||
import java.util.logging.Logger;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jivesoftware.smack.Roster.SubscriptionMode;
|
||||
import org.jivesoftware.smack.*;
|
||||
import org.jivesoftware.smack.Roster.SubscriptionMode;
|
||||
import org.jivesoftware.smack.packet.Message;
|
||||
import org.jivesoftware.smack.packet.Presence;
|
||||
import org.jivesoftware.smack.util.StringUtils;
|
||||
|
||||
|
||||
public class XMPPManager extends Handler implements MessageListener, ChatManagerListener, IReload
|
||||
public final class XMPPManager extends Handler implements MessageListener, ChatManagerListener, IReload
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger("Minecraft");
|
||||
private transient YamlConfiguration config = null;
|
||||
@@ -59,7 +60,7 @@ public class XMPPManager extends Handler implements MessageListener, ChatManager
|
||||
disconnect();
|
||||
connect();
|
||||
}
|
||||
chat.sendMessage(message.replaceAll("§[0-9a-f]", ""));
|
||||
chat.sendMessage(Util.stripFormat(message));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -131,7 +132,7 @@ public class XMPPManager extends Handler implements MessageListener, ChatManager
|
||||
}
|
||||
}
|
||||
|
||||
public final void disconnect()
|
||||
public void disconnect()
|
||||
{
|
||||
if (loggerThread != null)
|
||||
{
|
||||
@@ -164,7 +165,7 @@ public class XMPPManager extends Handler implements MessageListener, ChatManager
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void onReload()
|
||||
public void onReload()
|
||||
{
|
||||
LOGGER.removeHandler(this);
|
||||
config = YamlConfiguration.loadConfiguration(new File(parent.getDataFolder(), "config.yml"));
|
@@ -1,13 +1,13 @@
|
||||
# This determines the command prefix when there are conflicts (/name:home, /name:help, etc.)
|
||||
name: EssentialsXMPP
|
||||
main: com.earth2me.essentials.xmpp.EssentialsXMPP
|
||||
main: net.ess3.xmpp.EssentialsXMPP
|
||||
# Note to developers: This next line cannot change, or the automatic versioning system will break.
|
||||
version: ${build.number}
|
||||
website: http://tiny.cc/EssentialsWiki
|
||||
description: Provides xmpp communication.
|
||||
authors:
|
||||
- snowleo
|
||||
depend: [Essentials3]
|
||||
depend: [Essentials-3]
|
||||
commands:
|
||||
setxmpp:
|
||||
description: set your xmpp address
|
||||
|
Reference in New Issue
Block a user