out/artifacts/SSISAuth_jar/SSISAuth.jar
out/artifacts/SSISAuth_jar/SSISAuth.jar
This is a binary file and will not be displayed.
+8
-5
src/main/java/com/keii/ssisauth/events/PlayerJoin.java
+8
-5
src/main/java/com/keii/ssisauth/events/PlayerJoin.java
···
4
4
import com.destroystokyo.paper.profile.ProfileProperty;
5
5
import net.kyori.adventure.text.Component;
6
6
import net.kyori.adventure.text.TextComponent;
7
+
import net.kyori.adventure.text.format.NamedTextColor;
7
8
import org.bukkit.Bukkit;
8
9
import org.bukkit.ChatColor;
9
10
import org.bukkit.Color;
···
72
73
//e.getPlayer().playerListName(Component.text().content(ChatColor.WHITE + result[3] + result[4].charAt(0)).build());
73
74
74
75
e.joinMessage(Component.text().content("§e" + result[2] + " " + result[3] + result[4].charAt(0) + " joined the game").build());
76
+
e.getPlayer().sendMessage(Component.text("Glöm inte att du kan använda /map för att claima mark.").color(NamedTextColor.YELLOW));
75
77
76
78
if(playerClass.containsKey(result[3] + result[4].charAt(0)))
77
79
playerClass.remove(result[3] + result[4].charAt(0));
···
81
83
playerPermission.remove(result[3] + result[4].charAt(0));
82
84
playerPermission.put(result[3] + result[4].charAt(0), Integer.parseInt(result[5]));
83
85
84
-
PlayerProfile oldProfile = e.getPlayer().getPlayerProfile();
85
-
Set<ProfileProperty> old = oldProfile.getProperties();
86
-
var profile = Bukkit.createProfileExact(e.getPlayer().getUniqueId(), result[3] + result[4].charAt(0));
87
-
profile.setProperties(old); // The players previous properties
88
-
e.getPlayer().setPlayerProfile(profile);
86
+
e.getPlayer().displayName(Component.text(result[3] + result[4].charAt(0)));
87
+
// PlayerProfile oldProfile = e.getPlayer().getPlayerProfile();
88
+
// Set<ProfileProperty> old = oldProfile.getProperties();
89
+
// var profile = Bukkit.createProfileExact(e.getPlayer().getUniqueId(), result[3] + result[4].charAt(0));
90
+
// profile.setProperties(old); // The players previous properties
91
+
// e.getPlayer().setPlayerProfile(profile);
89
92
}
90
93
}
91
94
}