-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
102 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
25 changes: 25 additions & 0 deletions
25
platforms/bukkit/src/main/java/com/deathmotion/playercrasher/commands/BukkitPCCommand.java
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,25 @@ | ||
package com.deathmotion.playercrasher.commands; | ||
|
||
import com.deathmotion.playercrasher.PCBukkit; | ||
import com.deathmotion.playercrasher.util.CommandUtil; | ||
import com.deathmotion.playercrasher.util.MessageSender; | ||
import org.bukkit.command.Command; | ||
import org.bukkit.command.CommandExecutor; | ||
import org.bukkit.command.CommandSender; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public class BukkitPCCommand implements CommandExecutor { | ||
private final MessageSender messageSender; | ||
|
||
public BukkitPCCommand(PCBukkit plugin) { | ||
this.messageSender = plugin.getPc().messageSender; | ||
|
||
plugin.getCommand("PlayerCrasher").setExecutor(this); | ||
} | ||
|
||
@Override | ||
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) { | ||
messageSender.sendMessages(sender, CommandUtil.createPCCommandComponent()); | ||
return true; | ||
} | ||
} |
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
24 changes: 24 additions & 0 deletions
24
...orms/bungeecord/src/main/java/com/deathmotion/playercrasher/commands/BungeePCCommand.java
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,24 @@ | ||
package com.deathmotion.playercrasher.commands; | ||
|
||
import com.deathmotion.playercrasher.PCBungee; | ||
import com.deathmotion.playercrasher.Util.MessageSender; | ||
import com.deathmotion.playercrasher.util.CommandUtil; | ||
import net.md_5.bungee.api.CommandSender; | ||
import net.md_5.bungee.api.plugin.Command; | ||
|
||
public class BungeePCCommand extends Command { | ||
|
||
private final MessageSender messageSender; | ||
|
||
public BungeePCCommand(PCBungee plugin) { | ||
super("PlayerCrasher", null, "pc"); | ||
|
||
this.messageSender = plugin.getPc().messageSender; | ||
plugin.getProxy().getPluginManager().registerCommand(plugin, this); | ||
} | ||
|
||
@Override | ||
public void execute(CommandSender sender, String[] args) { | ||
messageSender.sendMessages(sender, CommandUtil.createPCCommandComponent()); | ||
} | ||
} |
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
21 changes: 21 additions & 0 deletions
21
...orms/velocity/src/main/java/com/deathmotion/playercrasher/commands/VelocityPCCommand.java
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,21 @@ | ||
package com.deathmotion.playercrasher.commands; | ||
|
||
import com.deathmotion.playercrasher.PCVelocity; | ||
import com.deathmotion.playercrasher.util.CommandUtil; | ||
import com.velocitypowered.api.command.CommandMeta; | ||
import com.velocitypowered.api.command.SimpleCommand; | ||
|
||
public class VelocityPCCommand implements SimpleCommand { | ||
|
||
public VelocityPCCommand(PCVelocity plugin) { | ||
CommandMeta commandMeta = plugin.getPc().getPlatform().getCommandManager().metaBuilder("crashinfo") | ||
.aliases("brand") | ||
.build(); | ||
plugin.getPc().getPlatform().getCommandManager().register(commandMeta, this); | ||
} | ||
|
||
@Override | ||
public void execute(Invocation invocation) { | ||
invocation.source().sendMessage(CommandUtil.createPCCommandComponent()); | ||
} | ||
} |