Added unlaugh and stuff

This commit is contained in:
Norbi Peti 2016-01-02 00:31:16 +01:00
parent f99c0528dd
commit e1e1ffe6b3
8 changed files with 11 additions and 2 deletions

Binary file not shown.

View file

@ -32,6 +32,7 @@ import java.util.Timer;
public class Commands implements CommandExecutor { public class Commands implements CommandExecutor {
public static MaybeOfflinePlayer Lastlol = null; public static MaybeOfflinePlayer Lastlol = null;
public static boolean Lastlolornot;
// This method is called, when somebody uses our command // This method is called, when somebody uses our command
@Override @Override
@ -201,7 +202,8 @@ public class Commands implements CommandExecutor {
PotionEffectType.BLINDNESS, 10 * 20, 5, false, PotionEffectType.BLINDNESS, 10 * 20, 5, false,
false)); false));
for (Player pl : PluginMain.GetPlayers()) for (Player pl : PluginMain.GetPlayers())
pl.sendMessage(player.getDisplayName() + " unlolled " pl.sendMessage(player.getDisplayName()
+ (Lastlolornot ? " unlolled " : " unlaughed ")
+ p.getDisplayName()); + p.getDisplayName());
Lastlol = null; Lastlol = null;
} }

View file

@ -155,9 +155,16 @@ public class PlayerListener implements Listener { // 2015.07.16.
} }
boolean greentext = event.getMessage().startsWith(">"); boolean greentext = event.getMessage().startsWith(">");
if (event.getMessage().contains("lol")) String msg = event.getMessage().toLowerCase();
if (msg.contains("lol")) {
Commands.Lastlol = MaybeOfflinePlayer.AllPlayers.get(event Commands.Lastlol = MaybeOfflinePlayer.AllPlayers.get(event
.getPlayer().getUniqueId()); .getPlayer().getUniqueId());
Commands.Lastlolornot = true;
} else if (msg.contains("xd") || msg.contains("lel")) {
Commands.Lastlol = MaybeOfflinePlayer.AllPlayers.get(event
.getPlayer().getUniqueId());
Commands.Lastlolornot = false;
}
MaybeOfflinePlayer player = MaybeOfflinePlayer.AllPlayers.get(event MaybeOfflinePlayer player = MaybeOfflinePlayer.AllPlayers.get(event
.getPlayer().getUniqueId()); .getPlayer().getUniqueId());