mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-05 23:24:44 +02:00
Exploit Prevention config pt 2
This commit is contained in:
@ -1,32 +0,0 @@
|
||||
package com.gmail.nossr50.config.hocon.antiexploit;
|
||||
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ConfigSerializable
|
||||
public class AntiExploit {
|
||||
private static final boolean ENDERMEN_ENDERMITE_DEFAULT = true;
|
||||
private static final boolean PISTONS_MARK_BLOCKS_DEFAULT = true;
|
||||
public static final boolean SPAWNED_MOBS_DEFAULT = true;
|
||||
|
||||
/*
|
||||
* CONFIG NODES
|
||||
*/
|
||||
|
||||
@Setting(value = "Endermen-Endermite-Fix",
|
||||
comment = "Removes XP from Endermen that target endermite, this is a common exploit in The End because of how rapidly they can spawn." +
|
||||
"\nIt is recommended that you leave this on as it allows players to easily gain massive amounts of combat XP" +
|
||||
"\nDefault value: "+ENDERMEN_ENDERMITE_DEFAULT)
|
||||
private boolean endermenEndermiteFix = ENDERMEN_ENDERMITE_DEFAULT;
|
||||
|
||||
@Setting(value = "Pistons-Mark-Blocks-As-Unnatural",
|
||||
comment = "Unnatural blocks give no XP." +
|
||||
"This helps prevent complex automated stone farms that enable auto clickers to gain XP passively.")
|
||||
private boolean pistonsMarkBlocksUnnatural = PISTONS_MARK_BLOCKS_DEFAULT;
|
||||
|
||||
@Setting(value = "Spawned-Mobs-Give-No-XP",
|
||||
comment = "Spawned mobs will not give players combat XP." +
|
||||
"\nThis includes mobs spawned from a nether portal, mob spawner, or eggs." +
|
||||
"\nThis will not include mobs spawned from commands, typically.")
|
||||
private boolean spawnedMobsGiveNoXP = SPAWNED_MOBS_DEFAULT;
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
package com.gmail.nossr50.config.hocon.antiexploit;
|
||||
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ConfigSerializable
|
||||
public class ConfigExploitPrevention {
|
||||
private static final boolean ENDERMEN_ENDERMITE_DEFAULT = true;
|
||||
private static final boolean PISTONS_MARK_BLOCKS_DEFAULT = true;
|
||||
public static final boolean SPAWNED_MOBS_DEFAULT = true;
|
||||
public static final boolean TAMED_MOB_DEFAULT = true;
|
||||
|
||||
/*
|
||||
* CONFIG NODES
|
||||
*/
|
||||
|
||||
@Setting(value = "Endermen-Endermite-Fix",
|
||||
comment = "Removes XP from Endermen that target endermite, this is a common exploit in The End because of how rapidly they can spawn." +
|
||||
"\nIt is recommended that you leave this on as it allows players to easily gain massive amounts of combat XP" +
|
||||
"\nDefault value: "+ENDERMEN_ENDERMITE_DEFAULT)
|
||||
private boolean endermenEndermiteFix = ENDERMEN_ENDERMITE_DEFAULT;
|
||||
|
||||
@Setting(value = "Pistons-Mark-Blocks-As-Unnatural",
|
||||
comment = "Unnatural blocks give no XP." +
|
||||
"This helps prevent complex automated stone farms that enable auto clickers to gain XP passively." +
|
||||
"\nDefault value: "+PISTONS_MARK_BLOCKS_DEFAULT)
|
||||
private boolean pistonsMarkBlocksUnnatural = PISTONS_MARK_BLOCKS_DEFAULT;
|
||||
|
||||
@Setting(value = "Spawned-Mobs-Have-Modified-XP-Values",
|
||||
comment = "Spawned mobs will give different XP values than their naturally spawning counterparts" +
|
||||
"\nBy default, spawned mob XP is reduced to zero, but you could change it in the experience config to whatever you want." +
|
||||
"\nSpawned mobs include mobs spawned from a nether portal, mob spawner, or eggs." +
|
||||
"\nThis will not include mobs spawned from commands, typically." +
|
||||
"\nDefault value: "+SPAWNED_MOBS_DEFAULT)
|
||||
private boolean markSpawnedMobs = SPAWNED_MOBS_DEFAULT;
|
||||
|
||||
@Setting(value = "Prevent-Tamed-Mob-XP", comment = "Prevents tamed entities from giving any XP" +
|
||||
"\nDefault value: "+TAMED_MOB_DEFAULT)
|
||||
private boolean preventTamedMobXp = TAMED_MOB_DEFAULT;
|
||||
|
||||
|
||||
public boolean getEndermenEndermiteFix() {
|
||||
return endermenEndermiteFix;
|
||||
}
|
||||
|
||||
public boolean doPistonsMarkBlocksUnnatural() {
|
||||
return pistonsMarkBlocksUnnatural;
|
||||
}
|
||||
|
||||
public boolean doSpawnedEntitiesGiveModifiedXP() {
|
||||
return markSpawnedMobs;
|
||||
}
|
||||
|
||||
public boolean doTamedEntitiesGiveXP() {
|
||||
return preventTamedMobXp;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user