Fixed Towny spy and did something to Votifier
This commit is contained in:
parent
668c02a1e8
commit
3c00e25719
4 changed files with 4 additions and 3 deletions
Binary file not shown.
|
@ -345,7 +345,7 @@ public class PlayerListener implements Listener { // 2015.07.16.
|
||||||
for (Player p : PluginMain.GetPlayers()) {
|
for (Player p : PluginMain.GetPlayers()) {
|
||||||
try {
|
try {
|
||||||
Resident resident = PluginMain.Instance.TU.getResidentMap()
|
Resident resident = PluginMain.Instance.TU.getResidentMap()
|
||||||
.get(p.getName());
|
.get(p.getName().toLowerCase());
|
||||||
if (!resident.getName().equals(event.getPlayer().getName())
|
if (!resident.getName().equals(event.getPlayer().getName())
|
||||||
&& resident.getModes().contains("spy"))
|
&& resident.getModes().contains("spy"))
|
||||||
Bukkit.getPlayer(resident.getName()).sendMessage(
|
Bukkit.getPlayer(resident.getName()).sendMessage(
|
||||||
|
@ -354,6 +354,7 @@ public class PlayerListener implements Listener { // 2015.07.16.
|
||||||
event.getPlayer().getDisplayName(),
|
event.getPlayer().getDisplayName(),
|
||||||
event.getMessage()));
|
event.getMessage()));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
// e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (player.CurrentChannel.equals(Channel.TownChat)) {
|
if (player.CurrentChannel.equals(Channel.TownChat)) {
|
||||||
|
@ -807,12 +808,12 @@ public class PlayerListener implements Listener { // 2015.07.16.
|
||||||
Bukkit.getPlayer(meta.getLore().get(0)));
|
Bukkit.getPlayer(meta.getLore().get(0)));
|
||||||
e.getItem().remove();
|
e.getItem().remove();
|
||||||
// System.out.println("G");
|
// System.out.println("G");
|
||||||
e.setCancelled(true);
|
e.setCancelled(true); // TODO: /tableflip /unflip with spawm detection
|
||||||
// System.out.println("H");
|
// System.out.println("H");
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public void onVotifierEvent(VotifierEvent event) {
|
public void onVotifierEvent(VotifierEvent event) {
|
||||||
Vote vote = event.getVote();
|
Vote vote = event.getVote();
|
||||||
System.out.println("Vote: " + vote);
|
System.out.println("Vote: " + vote);
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue