Commit 9e36f930 authored by Moritz Sokoll's avatar Moritz Sokoll 🦀
Browse files

finished nick plugin

parent f888c393
Pipeline #111 passed with stage
in 1 minute and 6 seconds
...@@ -14,6 +14,8 @@ import org.bukkit.event.player.PlayerJoinEvent ...@@ -14,6 +14,8 @@ import org.bukkit.event.player.PlayerJoinEvent
import org.bukkit.event.player.PlayerQuitEvent import org.bukkit.event.player.PlayerQuitEvent
import org.bukkit.inventory.ItemStack import org.bukkit.inventory.ItemStack
import org.bukkit.plugin.java.JavaPlugin import org.bukkit.plugin.java.JavaPlugin
import org.bukkit.scoreboard.DisplaySlot
import org.bukkit.scoreboard.Scoreboard
import java.sql.Time import java.sql.Time
import java.time.Instant import java.time.Instant
...@@ -72,11 +74,13 @@ public class Loader : JavaPlugin(), Listener, CommandExecutor { ...@@ -72,11 +74,13 @@ public class Loader : JavaPlugin(), Listener, CommandExecutor {
} }
else { else {
sender.setDisplayName(args.joinToString(" ")) sender.setDisplayName(args.joinToString(" "))
sender.setPlayerListName(args.joinToString(" "))
sender.sendMessage("§2You are now nicked") sender.sendMessage("§2You are now nicked")
} }
} }
"unnick" -> { "unnick" -> {
sender.setDisplayName(sender.name) sender.setDisplayName(sender.name)
sender.setPlayerListName(sender.name)
sender.sendMessage("§4You are not nicked anymore!") sender.sendMessage("§4You are not nicked anymore!")
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment