mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-01-15 03:51:20 +01:00
Block JourneyMap radar and cavemappings
http://minecraft.curseforge.com/mc-mods/225341-journeymap-server
This commit is contained in:
parent
5f0c70f138
commit
247d256082
7
.gitignore
vendored
Normal file
7
.gitignore
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
*.class
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.ear
|
||||
*/target/
|
@ -4,6 +4,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import fr.neatmonster.nocheatplus.clients.motd.CJBMOTD;
|
||||
import fr.neatmonster.nocheatplus.clients.motd.ClientMOTD;
|
||||
import fr.neatmonster.nocheatplus.clients.motd.JourneyMapMOTD;
|
||||
import fr.neatmonster.nocheatplus.clients.motd.MCAutoMapMOTD;
|
||||
import fr.neatmonster.nocheatplus.clients.motd.ReiMOTD;
|
||||
import fr.neatmonster.nocheatplus.clients.motd.SmartMovingMOTD;
|
||||
@ -24,7 +25,8 @@ public class ModUtil {
|
||||
new ZombeMOTD(),
|
||||
new SmartMovingMOTD(),
|
||||
new CJBMOTD(),
|
||||
new MCAutoMapMOTD()
|
||||
new MCAutoMapMOTD(),
|
||||
new JourneyMapMOTD()
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -0,0 +1,34 @@
|
||||
package fr.neatmonster.nocheatplus.clients.motd;
|
||||
|
||||
import fr.neatmonster.nocheatplus.permissions.Permissions;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class JourneyMapMOTD extends ClientMOTD {
|
||||
|
||||
@Override
|
||||
public String onPlayerJoin(String message, Player player, boolean allowAll) {
|
||||
|
||||
if (allowAll) {
|
||||
return message;
|
||||
}
|
||||
|
||||
String journeyMap = "";
|
||||
|
||||
// Disable JourneyMap's Radar.
|
||||
if (!player.hasPermission(Permissions.JOURNEY_RADAR)) {
|
||||
journeyMap += "§3 §6 §3 §6 §3 §6 §e";
|
||||
}
|
||||
|
||||
// Disable JourneyMap's CaveMap.
|
||||
if (!player.hasPermission(Permissions.JOURNEY_CAVE)) {
|
||||
journeyMap += "§3 §6 §3 §6 §3 §6 §d";
|
||||
}
|
||||
|
||||
if (journeyMap.isEmpty()) {
|
||||
return message;
|
||||
} else {
|
||||
return message + journeyMap;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -161,5 +161,8 @@ public class Permissions {
|
||||
public static final String ZOMBE_CHEAT = ZOMBE + ".cheat";
|
||||
public static final String ZOMBE_FLY = ZOMBE + ".fly";
|
||||
public static final String ZOMBE_NOCLIP = ZOMBE + ".noclip";
|
||||
|
||||
|
||||
private static final String JOURNEY = MODS + ".journey";
|
||||
public static final String JOURNEY_RADAR = JOURNEY + ".radar";
|
||||
public static final String JOURNEY_CAVE = JOURNEY + ".cavemap";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user