-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Needs testing! Signed-off-by: Grafe <[email protected]>
- Loading branch information
Showing
6 changed files
with
87 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,26 @@ | ||
package com.dre.managerxl.commands.managing; | ||
|
||
public class MotD { | ||
//TODO: Implement Command | ||
import org.bukkit.command.CommandSender; | ||
|
||
import com.dre.managerxl.P; | ||
import com.dre.managerxl.commands.MCommand; | ||
|
||
public class MotD extends MCommand{ | ||
|
||
public MotD(){ | ||
this.command = "motd"; | ||
this.parrent = null; | ||
this.help = P.p.getLanguageReader().get("Help_MotD"); | ||
this.permission = "mxl.cmd.managing.motd"; | ||
|
||
this.isConsoleCommand = true; | ||
this.isPlayerCommand = true; | ||
|
||
this.init(); | ||
} | ||
|
||
@Override | ||
public void onExecute(String[] args, CommandSender sender) { | ||
P.p.msg(sender, P.p.getMotD()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,27 @@ | ||
package com.dre.managerxl.commands.managing; | ||
|
||
public class MotDSet { | ||
//TODO: Implement Command | ||
import org.bukkit.command.CommandSender; | ||
|
||
import com.dre.managerxl.P; | ||
import com.dre.managerxl.commands.MCommand; | ||
import com.dre.managerxl.util.MUtility; | ||
|
||
public class MotDSet extends MCommand{ | ||
public MotDSet(){ | ||
this.command = "motdset"; | ||
this.parrent = null; | ||
this.help = P.p.getLanguageReader().get("Help_MotDSet"); | ||
this.permission = "mxl.cmd.managing.motdset"; | ||
|
||
this.isConsoleCommand = true; | ||
this.isPlayerCommand = true; | ||
|
||
this.init(); | ||
} | ||
|
||
@Override | ||
public void onExecute(String[] args, CommandSender sender) { | ||
P.p.setMotD(P.p.replaceColors(MUtility.parseMessage(args, 0))); | ||
P.p.msg(sender, P.p.getLanguageReader().get("Cmd_MotDSet_Success")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.dre.managerxl.listeners; | ||
|
||
import org.bukkit.event.EventHandler; | ||
import org.bukkit.event.Listener; | ||
import org.bukkit.event.server.ServerListPingEvent; | ||
|
||
import com.dre.managerxl.P; | ||
|
||
public class ServerListener implements Listener{ | ||
|
||
@EventHandler() | ||
public void onServerListPing(ServerListPingEvent event){ | ||
/* Set MotD */ | ||
event.setMotd(P.p.getMotD()); | ||
} | ||
} |