SteamWar/SpigotCore
Archiviert
13
0

Unifying naming

Dieser Commit ist enthalten in:
Lixfel 2019-11-20 14:07:57 +01:00
Ursprung 6e30c05b66
Commit 4a8206edae
8 geänderte Dateien mit 21 neuen und 21 gelöschten Zeilen

Datei anzeigen

@ -4,8 +4,8 @@ import org.bukkit.craftbukkit.v1_12_R1.inventory.CraftInventoryCustom;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;
class SWInventory_v12 {
private SWInventory_v12(){}
class SWInventory_12 {
private SWInventory_12(){}
static Inventory get(Player player, int size, String title){
return new CraftInventoryCustom(player, size, title);

Datei anzeigen

@ -4,8 +4,8 @@ import org.bukkit.Material;
import org.bukkit.OfflinePlayer;
import org.bukkit.inventory.meta.SkullMeta;
class SWItem_v12 {
private SWItem_v12(){}
class SWItem_12 {
private SWItem_12(){}
static Material getMaterial(String material){
return Material.valueOf(material);

Datei anzeigen

@ -4,8 +4,8 @@ import org.bukkit.craftbukkit.v1_14_R1.inventory.CraftInventoryCustom;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;
class SWInventory_v14 {
private SWInventory_v14() {}
class SWInventory_14 {
private SWInventory_14() {}
static Inventory get(Player player, int size, String title){
return new CraftInventoryCustom(player, size, title);

Datei anzeigen

@ -2,8 +2,8 @@ package de.steamwar.inventory;
import org.bukkit.Material;
class SWItem_v14 {
private SWItem_v14(){}
class SWItem_14 {
private SWItem_14(){}
static Material getMaterial(String material) {
return Material.valueOf("LEGACY_" + material);

Datei anzeigen

@ -4,8 +4,8 @@ import org.bukkit.craftbukkit.v1_8_R3.inventory.CraftInventoryCustom;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;
class SWInventory_v8 {
private SWInventory_v8(){}
class SWInventory_8 {
private SWInventory_8(){}
static Inventory get(Player player, int size, String title){
return new CraftInventoryCustom(player, size, title);

Datei anzeigen

@ -3,8 +3,8 @@ package de.steamwar.inventory;
import org.bukkit.OfflinePlayer;
import org.bukkit.inventory.meta.SkullMeta;
class SWItem_v8 {
private SWItem_v8(){}
class SWItem_8 {
private SWItem_8(){}
static void setSkullOwner(OfflinePlayer player, SkullMeta meta){
meta.setOwner(player.getName());

Datei anzeigen

@ -26,13 +26,13 @@ public class SWInventory implements Listener {
player = p;
switch(Core.getVersion()){
case 8:
inventory = SWInventory_v8.get(p, size, t);
inventory = SWInventory_8.get(p, size, t);
break;
case 14:
inventory = SWInventory_v14.get(p, size, t);
inventory = SWInventory_14.get(p, size, t);
break;
default:
inventory = SWInventory_v12.get(p, size, t);
inventory = SWInventory_12.get(p, size, t);
}
}

Datei anzeigen

@ -24,10 +24,10 @@ public class SWItem {
SkullMeta headmeta = (SkullMeta) head.getItemMeta();
switch(Core.getVersion()){
case 8:
SWItem_v8.setSkullOwner(player, headmeta);
SWItem_8.setSkullOwner(player, headmeta);
break;
default:
SWItem_v12.setSkullOwner(player, headmeta);
SWItem_12.setSkullOwner(player, headmeta);
}
headmeta.setDisplayName(player.getName());
head.setItemMeta(headmeta);
@ -39,9 +39,9 @@ public class SWItem {
try{
switch(Core.getVersion()){
case 14:
return SWItem_v14.getMaterial(material);
return SWItem_14.getMaterial(material);
default:
return SWItem_v12.getMaterial(material);
return SWItem_12.getMaterial(material);
}
}catch(IllegalArgumentException e){
return Material.STONE;
@ -51,9 +51,9 @@ public class SWItem {
public static Material getDye(int colorCode){
switch(Core.getVersion()){
case 14:
return SWItem_v14.getDye(colorCode);
return SWItem_14.getDye(colorCode);
default:
return SWItem_v12.getDye();
return SWItem_12.getDye();
}
}