移除server config
This commit is contained in:
parent
5a6fa37edb
commit
a22440ddff
4 changed files with 0 additions and 40 deletions
|
@ -1,7 +1,6 @@
|
||||||
package net.mcreator.superbwarfare;
|
package net.mcreator.superbwarfare;
|
||||||
|
|
||||||
import net.mcreator.superbwarfare.config.ClientConfig;
|
import net.mcreator.superbwarfare.config.ClientConfig;
|
||||||
import net.mcreator.superbwarfare.config.ServerConfig;
|
|
||||||
import net.mcreator.superbwarfare.init.*;
|
import net.mcreator.superbwarfare.init.*;
|
||||||
import net.mcreator.superbwarfare.network.ModVariables;
|
import net.mcreator.superbwarfare.network.ModVariables;
|
||||||
import net.mcreator.superbwarfare.network.message.*;
|
import net.mcreator.superbwarfare.network.message.*;
|
||||||
|
@ -44,7 +43,6 @@ public class ModUtils {
|
||||||
|
|
||||||
public ModUtils() {
|
public ModUtils() {
|
||||||
ModLoadingContext.get().registerConfig(ModConfig.Type.CLIENT, ClientConfig.init());
|
ModLoadingContext.get().registerConfig(ModConfig.Type.CLIENT, ClientConfig.init());
|
||||||
ModLoadingContext.get().registerConfig(ModConfig.Type.SERVER, ServerConfig.init());
|
|
||||||
|
|
||||||
IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus();
|
IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus();
|
||||||
|
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
package net.mcreator.superbwarfare.config;
|
|
||||||
|
|
||||||
import net.mcreator.superbwarfare.config.server.KillMessageServerConfig;
|
|
||||||
import net.minecraftforge.common.ForgeConfigSpec;
|
|
||||||
|
|
||||||
public class ServerConfig {
|
|
||||||
|
|
||||||
public static ForgeConfigSpec init() {
|
|
||||||
ForgeConfigSpec.Builder builder = new ForgeConfigSpec.Builder();
|
|
||||||
|
|
||||||
KillMessageServerConfig.init(builder);
|
|
||||||
|
|
||||||
return builder.build();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
package net.mcreator.superbwarfare.config.server;
|
|
||||||
|
|
||||||
import net.minecraftforge.common.ForgeConfigSpec;
|
|
||||||
|
|
||||||
public class KillMessageServerConfig {
|
|
||||||
|
|
||||||
public static ForgeConfigSpec.BooleanValue SEND_KILL_MESSAGE;
|
|
||||||
|
|
||||||
public static void init(ForgeConfigSpec.Builder builder) {
|
|
||||||
builder.push("kill_message");
|
|
||||||
|
|
||||||
SEND_KILL_MESSAGE = builder.define("send_kill_message", false);
|
|
||||||
|
|
||||||
builder.pop();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,7 +1,6 @@
|
||||||
package net.mcreator.superbwarfare.event;
|
package net.mcreator.superbwarfare.event;
|
||||||
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.config.server.KillMessageServerConfig;
|
|
||||||
import net.mcreator.superbwarfare.entity.TargetEntity;
|
import net.mcreator.superbwarfare.entity.TargetEntity;
|
||||||
import net.mcreator.superbwarfare.entity.projectile.ProjectileEntity;
|
import net.mcreator.superbwarfare.entity.projectile.ProjectileEntity;
|
||||||
import net.mcreator.superbwarfare.init.*;
|
import net.mcreator.superbwarfare.init.*;
|
||||||
|
@ -239,10 +238,6 @@ public class LivingEventHandler {
|
||||||
* 发送击杀消息
|
* 发送击杀消息
|
||||||
*/
|
*/
|
||||||
private static void handlePlayerKillEntity(LivingDeathEvent event) {
|
private static void handlePlayerKillEntity(LivingDeathEvent event) {
|
||||||
if (!KillMessageServerConfig.SEND_KILL_MESSAGE.get()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
LivingEntity entity = event.getEntity();
|
LivingEntity entity = event.getEntity();
|
||||||
DamageSource source = event.getSource();
|
DamageSource source = event.getSource();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue