-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update du rtp du /feed du /tpa (#83)
Update du rtp du /feed du /tpa Le /rtp n'est plus disponible si on n'est pas op mais il y a le rtp wand (Il est dans https://discord.gg/aywen-communaute-1161296442577653802) Ajout du /tpcancel
- Loading branch information
Showing
12 changed files
with
140 additions
and
92 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
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
30 changes: 30 additions & 0 deletions
30
src/main/java/fr/communaywen/core/tpa/CommandTpcancel.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,30 @@ | ||
package fr.communaywen.core.tpa; | ||
|
||
import net.md_5.bungee.api.ChatColor; | ||
import org.bukkit.command.Command; | ||
import org.bukkit.command.CommandExecutor; | ||
import org.bukkit.command.CommandSender; | ||
import org.bukkit.entity.Player; | ||
|
||
public class CommandTpcancel implements CommandExecutor { | ||
|
||
TPAQueue tpQueue = TPAQueue.INSTANCE; | ||
|
||
@Override | ||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { | ||
if (sender instanceof Player) { | ||
Player player = (Player) sender; | ||
Player tpaplayer = tpQueue.TPA_REQUESTS2.get(player); | ||
if (tpaplayer == null) { | ||
player.sendMessage(ChatColor.RED + "Vous n'avez pas de demande de téléporation"); | ||
return true; | ||
} | ||
player.sendMessage(ChatColor.RED + player.getName() + " a refusé votre demande de téléportation"); | ||
tpQueue.TPA_REQUESTS.remove(tpaplayer); | ||
tpQueue.TPA_REQUESTS2.remove(player); | ||
return true; | ||
} | ||
|
||
return false; | ||
} | ||
} |
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
Oops, something went wrong.