mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-14 22:56:10 +01:00
Tag all group names with their ID
This commit is contained in:
parent
8d7e0a552e
commit
c980074201
@ -89,11 +89,11 @@ public class DGroup implements PlayerGroup {
|
|||||||
private int lives = -1;
|
private int lives = -1;
|
||||||
|
|
||||||
public DGroup(DungeonsXL plugin, Player player) {
|
public DGroup(DungeonsXL plugin, Player player) {
|
||||||
this(plugin, "Group#" + counter, player);
|
this(plugin, "Group", player);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DGroup(DungeonsXL plugin, Player player, Color color) {
|
public DGroup(DungeonsXL plugin, Player player, Color color) {
|
||||||
this(plugin, color.toString() + "#" + counter, player);
|
this(plugin, color.toString(), player);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DGroup(DungeonsXL plugin, String name, Player player) {
|
public DGroup(DungeonsXL plugin, String name, Player player) {
|
||||||
@ -101,7 +101,8 @@ public class DGroup implements PlayerGroup {
|
|||||||
dPlayers = plugin.getPlayerCache();
|
dPlayers = plugin.getPlayerCache();
|
||||||
|
|
||||||
plugin.getGroupCache().add(name, this);
|
plugin.getGroupCache().add(name, this);
|
||||||
this.name = name;
|
id = counter++;
|
||||||
|
this.name = name + "#" + id;
|
||||||
|
|
||||||
GroupPlayerJoinEvent event = new GroupPlayerJoinEvent(this, dPlayers.get(player), true);
|
GroupPlayerJoinEvent event = new GroupPlayerJoinEvent(this, dPlayers.get(player), true);
|
||||||
Bukkit.getPluginManager().callEvent(event);
|
Bukkit.getPluginManager().callEvent(event);
|
||||||
@ -115,12 +116,10 @@ public class DGroup implements PlayerGroup {
|
|||||||
|
|
||||||
playing = false;
|
playing = false;
|
||||||
floorCount = 0;
|
floorCount = 0;
|
||||||
|
|
||||||
id = counter++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public DGroup(DungeonsXL plugin, Player player, Dungeon dungeon) {
|
public DGroup(DungeonsXL plugin, Player player, Dungeon dungeon) {
|
||||||
this(plugin, "Group#" + counter, player, dungeon);
|
this(plugin, "Group", player, dungeon);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DGroup(DungeonsXL plugin, String name, Player player, Dungeon dungeon) {
|
public DGroup(DungeonsXL plugin, String name, Player player, Dungeon dungeon) {
|
||||||
@ -132,7 +131,8 @@ public class DGroup implements PlayerGroup {
|
|||||||
dPlayers = plugin.getPlayerCache();
|
dPlayers = plugin.getPlayerCache();
|
||||||
|
|
||||||
plugin.getGroupCache().add(name, this);
|
plugin.getGroupCache().add(name, this);
|
||||||
this.name = name;
|
id = counter++;
|
||||||
|
this.name = name + "#" + id;
|
||||||
|
|
||||||
GroupPlayerJoinEvent event = new GroupPlayerJoinEvent(this, dPlayers.get(captain), true);
|
GroupPlayerJoinEvent event = new GroupPlayerJoinEvent(this, dPlayers.get(captain), true);
|
||||||
Bukkit.getPluginManager().callEvent(event);
|
Bukkit.getPluginManager().callEvent(event);
|
||||||
@ -154,8 +154,6 @@ public class DGroup implements PlayerGroup {
|
|||||||
setDungeon(dungeon);
|
setDungeon(dungeon);
|
||||||
playing = false;
|
playing = false;
|
||||||
floorCount = 0;
|
floorCount = 0;
|
||||||
|
|
||||||
id = counter++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Getters and setters
|
// Getters and setters
|
||||||
|
Loading…
Reference in New Issue
Block a user