Fixing Material not found
Dieser Commit ist enthalten in:
Ursprung
5e917150c2
Commit
ed452b2856
@ -12,7 +12,7 @@ public class PlayerJoinedEvent implements Listener{
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
private void onJoin(PlayerJoinEvent event) {
|
private void onJoin(PlayerJoinEvent event) {
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
SteamwarUser user = SteamwarUser.get(player.getUniqueId());
|
SteamwarUser user = SteamwarUser.get(player.getUniqueId());
|
||||||
|
|
||||||
switch(user.getUserGroup()){
|
switch(user.getUserGroup()){
|
||||||
|
@ -30,11 +30,15 @@ public class SWItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Material getMaterial(String material){
|
public static Material getMaterial(String material){
|
||||||
switch(Core.getVersion()){
|
try{
|
||||||
case 14:
|
switch(Core.getVersion()){
|
||||||
return SWItem_v14.getMaterial(material);
|
case 14:
|
||||||
default:
|
return SWItem_v14.getMaterial(material);
|
||||||
return SWItem_v12.getMaterial(material);
|
default:
|
||||||
|
return SWItem_v12.getMaterial(material);
|
||||||
|
}
|
||||||
|
}catch(IllegalArgumentException e){
|
||||||
|
return Material.STONE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ public class SteamwarUser {
|
|||||||
id = rs.getInt("id");
|
id = rs.getInt("id");
|
||||||
uuid = java.util.UUID.fromString(rs.getString("UUID"));
|
uuid = java.util.UUID.fromString(rs.getString("UUID"));
|
||||||
userName = rs.getString("UserName");
|
userName = rs.getString("UserName");
|
||||||
userGroup = de.steamwar.sql.UserGroup.valueOf(rs.getString("UserGroup"));
|
userGroup = UserGroup.valueOf(rs.getString("UserGroup"));
|
||||||
team = rs.getInt("Team");
|
team = rs.getInt("Team");
|
||||||
|
|
||||||
byUUID.put(uuid, this);
|
byUUID.put(uuid, this);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren