mirror of
https://github.com/cnaude/PurpleIRC-spigot.git
synced 2024-11-29 13:36:04 +01:00
Fix ConsoleCommandSender duplicating messages.
This commit is contained in:
parent
f842fe924a
commit
1360e32cca
@ -288,6 +288,12 @@
|
|||||||
<version>1.8-SNAPSHOT</version>
|
<version>1.8-SNAPSHOT</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.cnaude.shortify</groupId>
|
||||||
|
<artifactId>Shortify-Universal</artifactId>
|
||||||
|
<version>1.7-SNAPSHOT</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.cnaude.dynmap</groupId>
|
<groupId>com.cnaude.dynmap</groupId>
|
||||||
<artifactId>DynmapAPI</artifactId>
|
<artifactId>DynmapAPI</artifactId>
|
||||||
|
7
pom.xml
7
pom.xml
@ -268,6 +268,13 @@
|
|||||||
<version>1.8-SNAPSHOT</version>
|
<version>1.8-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Shortify -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.cnaude.shortify</groupId>
|
||||||
|
<artifactId>Shortify-Universal</artifactId>
|
||||||
|
<version>1.7-SNAPSHOT</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- DynmapAPI -->
|
<!-- DynmapAPI -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.cnaude.dynmap</groupId>
|
<groupId>com.cnaude.dynmap</groupId>
|
||||||
|
@ -19,6 +19,7 @@ package com.cnaude.purpleirc;
|
|||||||
import com.cnaude.purpleirc.Events.IRCCommandEvent;
|
import com.cnaude.purpleirc.Events.IRCCommandEvent;
|
||||||
import java.util.Queue;
|
import java.util.Queue;
|
||||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.command.CommandException;
|
import org.bukkit.command.CommandException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -19,16 +19,20 @@ package com.cnaude.purpleirc;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
import org.bukkit.craftbukkit.v1_8_R1.command.CraftConsoleCommandSender;
|
import org.bukkit.command.ConsoleCommandSender;
|
||||||
|
import org.bukkit.conversations.Conversation;
|
||||||
|
import org.bukkit.conversations.ConversationAbandonedEvent;
|
||||||
import org.bukkit.permissions.Permission;
|
import org.bukkit.permissions.Permission;
|
||||||
|
import org.bukkit.permissions.PermissionAttachment;
|
||||||
import org.bukkit.permissions.PermissionAttachmentInfo;
|
import org.bukkit.permissions.PermissionAttachmentInfo;
|
||||||
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Chris Naude We have to implement our own CommandSender so that we can
|
* @author Chris Naude We have to implement our own CommandSender so that we can
|
||||||
* receive output from the command dispatcher.
|
* receive output from the command dispatcher.
|
||||||
*/
|
*/
|
||||||
public class IRCConsoleCommandSender extends CraftConsoleCommandSender {
|
public class IRCConsoleCommandSender implements ConsoleCommandSender {
|
||||||
|
|
||||||
private final PurpleBot ircBot;
|
private final PurpleBot ircBot;
|
||||||
private final String target;
|
private final String target;
|
||||||
@ -152,4 +156,69 @@ public class IRCConsoleCommandSender extends CraftConsoleCommandSender {
|
|||||||
plugin.logDebug("sendRawMessage: " + string);
|
plugin.logDebug("sendRawMessage: " + string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PermissionAttachment addAttachment(Plugin plugin, String string, boolean bln) {
|
||||||
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PermissionAttachment addAttachment(Plugin plugin) {
|
||||||
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PermissionAttachment addAttachment(Plugin plugin, String string, boolean bln, int i) {
|
||||||
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PermissionAttachment addAttachment(Plugin plugin, int i) {
|
||||||
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void removeAttachment(PermissionAttachment pa) {
|
||||||
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void recalculatePermissions() {
|
||||||
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isOp() {
|
||||||
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setOp(boolean bln) {
|
||||||
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isConversing() {
|
||||||
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void acceptConversationInput(String string) {
|
||||||
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean beginConversation(Conversation c) {
|
||||||
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void abandonConversation(Conversation c) {
|
||||||
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void abandonConversation(Conversation c, ConversationAbandonedEvent cae) {
|
||||||
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user