Added #28, fixed #30 and #31

This commit is contained in:
Norbi Peti 2016-06-22 01:16:22 +02:00
parent 669c5aa616
commit 2d46c3bc20
4 changed files with 30 additions and 19 deletions

Binary file not shown.

View file

@ -363,6 +363,7 @@ public class ChatProcessing {
else else
obj.getScore(p.getName()).setScore(-1); obj.getScore(p.getName()).setScore(-1);
} catch (Exception e) { } catch (Exception e) {
obj.getScore(p.getName()).setScore(-1);
} }
} }
PluginMain.Instance PluginMain.Instance

View file

@ -275,7 +275,7 @@ public class Commands implements CommandExecutor {
return true; return true;
} }
case "tableflip": { case "tableflip": {
String msg = "(╯°□°)╯︵ ┻━┻"; String msg = " (╯°□°)╯︵ ┻━┻";
if (args.length > 0) { if (args.length > 0) {
msg = args[0] + " " + msg; msg = args[0] + " " + msg;
} }
@ -283,7 +283,15 @@ public class Commands implements CommandExecutor {
return true; return true;
} }
case "unflip": { case "unflip": {
String msg = "┬─┬ ( ゜-゜ノ)"; String msg = " ┬─┬ ( ゜-゜ノ)";
if (args.length > 0) {
msg = args[0] + "" + msg;
}
player.chat(msg);
return true;
}
case "shrug": {
String msg = " ¯\\_(ツ)_/¯";
if (args.length > 0) { if (args.length > 0) {
msg = args[0] + "" + msg; msg = args[0] + "" + msg;
} }

View file

@ -117,7 +117,7 @@ public class PlayerListener implements Listener {
} }
} }
}; };
tt.mp = mp; tt.mp = mp;;
timer.schedule(tt, 15 * 1000); timer.schedule(tt, 15 * 1000);
} }
@ -204,8 +204,8 @@ public class PlayerListener implements Listener {
tt.mp = mp; tt.mp = mp;
int timeout = AuthMe.getInstance().getConfig() int timeout = AuthMe.getInstance().getConfig()
.getInt("settings.restrictions.timeout"); .getInt("settings.restrictions.timeout");
timer.schedule(tt, timeout / LoginWarningCountTotal * 1000, timeout timer.schedule(tt, (timeout / LoginWarningCountTotal) * 1000,
/ LoginWarningCountTotal * 1000); (timeout / LoginWarningCountTotal) * 1000);
/* NICKNAME LOGIC */ /* NICKNAME LOGIC */
@ -712,20 +712,22 @@ public class PlayerListener implements Listener {
@EventHandler(priority = EventPriority.LOWEST) @EventHandler(priority = EventPriority.LOWEST)
public void onPlayerTeleport(PlayerTeleportEvent e) { public void onPlayerTeleport(PlayerTeleportEvent e) {
/*if (BoardColl.get().getFactionAt(PS.valueOf(e.getFrom())).getId() /*
.equalsIgnoreCase("nomansland") * if (BoardColl.get().getFactionAt(PS.valueOf(e.getFrom())).getId()
|| BoardColl.get().getFactionAt(PS.valueOf(e.getTo())).getId() * .equalsIgnoreCase("nomansland") ||
.equalsIgnoreCase("nomansland")) {*/ * BoardColl.get().getFactionAt(PS.valueOf(e.getTo())).getId()
// e.setTo(e.getFrom()); * .equalsIgnoreCase("nomansland")) {
//e.setCancelled(true); // Relative coordinates mess it up */
/* // e.setTo(e.getFrom());
* System.out.println("From: " + e.getFrom()); // e.setCancelled(true); // Relative coordinates mess it up
* System.out.println("To: " + e.getTo()); /*
* System.out.println("Cause: "+e.getCause()); * System.out.println("From: " + e.getFrom()); System.out.println("To: "
*/ * + e.getTo()); System.out.println("Cause: "+e.getCause());
/*e.getPlayer().sendMessage( */
"§cYou are not allowed to teleport to/from No Mans Land."); /*
}*/ * e.getPlayer().sendMessage(
* "§cYou are not allowed to teleport to/from No Mans Land."); }
*/
if (MaybeOfflinePlayer.GetFromPlayer(e.getPlayer()).ChatOnly) { if (MaybeOfflinePlayer.GetFromPlayer(e.getPlayer()).ChatOnly) {
e.setCancelled(true); e.setCancelled(true);