mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
cubev3.com
This commit is contained in:
parent
4f339b29b8
commit
b525e53348
2
pom.xml
2
pom.xml
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<groupId>me.totalfreedom</groupId>
|
<groupId>me.totalfreedom</groupId>
|
||||||
<artifactId>totalfreedom</artifactId>
|
<artifactId>totalfreedom</artifactId>
|
||||||
<version>6.0</version>
|
<version>5.3</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
@ -70,6 +70,7 @@ public class EntityWiper extends FreedomService
|
|||||||
wipables.add(ArmorStand.class);
|
wipables.add(ArmorStand.class);
|
||||||
wipables.add(Fireball.class);
|
wipables.add(Fireball.class);
|
||||||
wipables.add(DragonFireball.class);
|
wipables.add(DragonFireball.class);
|
||||||
|
wipables.add(Minecart.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -126,7 +126,7 @@ public class TotalFreedomMod extends AeroPlugin<TotalFreedomMod>
|
|||||||
public MasterBuilderWorldRestrictions mbwr;
|
public MasterBuilderWorldRestrictions mbwr;
|
||||||
public SignBlocker snp;
|
public SignBlocker snp;
|
||||||
public PlayerVerification pv;
|
public PlayerVerification pv;
|
||||||
public HubWorldRestrictions hwr;
|
//public HubWorldRestrictions hwr;
|
||||||
//
|
//
|
||||||
// Bridges
|
// Bridges
|
||||||
public ServiceManager<TotalFreedomMod> bridges;
|
public ServiceManager<TotalFreedomMod> bridges;
|
||||||
@ -201,7 +201,7 @@ public class TotalFreedomMod extends AeroPlugin<TotalFreedomMod>
|
|||||||
as = services.registerService(AntiSpam.class);
|
as = services.registerService(AntiSpam.class);
|
||||||
mbl = services.registerService(MasterBuilderList.class);
|
mbl = services.registerService(MasterBuilderList.class);
|
||||||
mbwr = services.registerService(MasterBuilderWorldRestrictions.class);
|
mbwr = services.registerService(MasterBuilderWorldRestrictions.class);
|
||||||
hwr = services.registerService(HubWorldRestrictions.class);
|
//hwr = services.registerService(HubWorldRestrictions.class);
|
||||||
|
|
||||||
pl = services.registerService(PlayerList.class);
|
pl = services.registerService(PlayerList.class);
|
||||||
an = services.registerService(Announcer.class);
|
an = services.registerService(Announcer.class);
|
||||||
|
@ -110,6 +110,13 @@ public class BlockBlocker extends FreedomService
|
|||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case SPAWNER:
|
||||||
|
player.sendMessage(ChatColor.GRAY + "Spawners are disabled.");
|
||||||
|
player.getInventory().setItem(player.getInventory().getHeldItemSlot(), new ItemStack(Material.COOKIE, 1));
|
||||||
|
event.setCancelled(true);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,23 @@
|
|||||||
package me.totalfreedom.totalfreedommod.blocking;
|
package me.totalfreedom.totalfreedommod.blocking;
|
||||||
|
|
||||||
|
import com.sk89q.worldedit.command.util.CreatureButcher;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import me.libraryaddict.disguise.disguisetypes.watchers.MinecartCommandWatcher;
|
||||||
import me.totalfreedom.totalfreedommod.FreedomService;
|
import me.totalfreedom.totalfreedommod.FreedomService;
|
||||||
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
|
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
|
||||||
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||||
import me.totalfreedom.totalfreedommod.util.FLog;
|
import me.totalfreedom.totalfreedommod.util.FLog;
|
||||||
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import me.totalfreedom.totalfreedommod.util.Groups;
|
import me.totalfreedom.totalfreedommod.util.Groups;
|
||||||
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.attribute.Attribute;
|
import org.bukkit.attribute.Attribute;
|
||||||
import org.bukkit.attribute.AttributeModifier;
|
import org.bukkit.attribute.AttributeModifier;
|
||||||
import org.bukkit.block.ShulkerBox;
|
import org.bukkit.block.ShulkerBox;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
|
import org.bukkit.entity.EntityType;
|
||||||
|
import org.bukkit.entity.Minecart;
|
||||||
import org.bukkit.entity.Tameable;
|
import org.bukkit.entity.Tameable;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
@ -19,6 +27,7 @@ import org.bukkit.event.block.BlockFromToEvent;
|
|||||||
import org.bukkit.event.block.BlockIgniteEvent;
|
import org.bukkit.event.block.BlockIgniteEvent;
|
||||||
import org.bukkit.event.block.BlockPistonExtendEvent;
|
import org.bukkit.event.block.BlockPistonExtendEvent;
|
||||||
import org.bukkit.event.block.BlockPistonRetractEvent;
|
import org.bukkit.event.block.BlockPistonRetractEvent;
|
||||||
|
import org.bukkit.event.block.BlockPlaceEvent;
|
||||||
import org.bukkit.event.block.BlockRedstoneEvent;
|
import org.bukkit.event.block.BlockRedstoneEvent;
|
||||||
import org.bukkit.event.block.LeavesDecayEvent;
|
import org.bukkit.event.block.LeavesDecayEvent;
|
||||||
import org.bukkit.event.entity.EntityCombustEvent;
|
import org.bukkit.event.entity.EntityCombustEvent;
|
||||||
@ -218,7 +227,8 @@ public class EventBlocker extends FreedomService
|
|||||||
@EventHandler(priority = EventPriority.NORMAL)
|
@EventHandler(priority = EventPriority.NORMAL)
|
||||||
public void onBlockDispense(BlockDispenseEvent event)
|
public void onBlockDispense(BlockDispenseEvent event)
|
||||||
{
|
{
|
||||||
if (Groups.SPAWN_EGGS.contains(event.getItem().getType()))
|
List<Material> banned = Arrays.asList(Material.TNT_MINECART, Material.MINECART);
|
||||||
|
if (Groups.SPAWN_EGGS.contains(event.getItem().getType()) || banned.contains(event.getItem().getType()))
|
||||||
{
|
{
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
@ -141,6 +141,18 @@ public class InteractBlocker extends FreedomService
|
|||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case MINECART:
|
||||||
|
{
|
||||||
|
if (ConfigEntry.ALLOW_MINECARTS.getBoolean())
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
player.getInventory().clear(player.getInventory().getHeldItemSlot());
|
||||||
|
player.sendMessage(ChatColor.GRAY + "Minecarts are currently disabled.");
|
||||||
|
event.setCancelled(true);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -54,6 +54,11 @@ public class SignBlocker extends FreedomService
|
|||||||
player.sendMessage(ChatColor.GRAY + "You are not allowed to place command signs.");
|
player.sendMessage(ChatColor.GRAY + "You are not allowed to place command signs.");
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
if (line1.contains("translate") || line2.contains("translate") || line3.contains("translate") || line4.contains("translate"))
|
||||||
|
{
|
||||||
|
player.sendMessage(ChatColor.GRAY + "You are not allowed to place broken strings that Mojang never fixed.");
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ import me.totalfreedom.totalfreedommod.util.FLog;
|
|||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import net.pravian.aero.command.CommandReflection;
|
import net.pravian.aero.command.CommandReflection;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandMap;
|
import org.bukkit.command.CommandMap;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -129,6 +130,12 @@ public class CommandBlocker extends FreedomService
|
|||||||
// CommandBlocker handles messages and broadcasts
|
// CommandBlocker handles messages and broadcasts
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event.getMessage().contains("translation.test."))
|
||||||
|
{
|
||||||
|
event.setCancelled(true);
|
||||||
|
FUtil.playerMsg(event.getPlayer(), ChatColor.RED + "No crishy crashy faggy");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isCommandBlocked(String command, CommandSender sender)
|
public boolean isCommandBlocked(String command, CommandSender sender)
|
||||||
|
@ -27,7 +27,10 @@ public class Command_hubworld extends FreedomCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
CommandMode commandMode = null;
|
msg(UNKNOWN_COMMAND);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
/*CommandMode commandMode = null;
|
||||||
|
|
||||||
if (args.length == 0)
|
if (args.length == 0)
|
||||||
{
|
{
|
||||||
@ -198,6 +201,7 @@ public class Command_hubworld extends FreedomCommand
|
|||||||
{
|
{
|
||||||
super(string);
|
super(string);
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NON_OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Link your Discord account to your Minecraft account", usage = "/<command>")
|
@CommandParameters(description = "Link your Discord account to your Minecraft account", usage = "/<command>")
|
||||||
public class Command_linkdiscord extends FreedomCommand
|
public class Command_linkdiscord extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
@ -11,7 +13,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "See who has a block and optionally clears the item.", usage = "/<command> <item> clear", aliases = "wh")
|
@CommandParameters(description = "See who has an item and optionally clear said item.", usage = "/<command> <item> [clear]", aliases = "wh")
|
||||||
public class Command_whohas extends FreedomCommand
|
public class Command_whohas extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -36,22 +38,20 @@ public class Command_whohas extends FreedomCommand
|
|||||||
|
|
||||||
final List<String> players = new ArrayList<>();
|
final List<String> players = new ArrayList<>();
|
||||||
|
|
||||||
if (!plugin.al.isAdmin(playerSender))
|
|
||||||
{
|
|
||||||
return noPerms();
|
|
||||||
}
|
|
||||||
|
|
||||||
for (final Player player : server.getOnlinePlayers())
|
for (final Player player : server.getOnlinePlayers())
|
||||||
{
|
{
|
||||||
if (player.getInventory().contains(material))
|
if (player.getInventory().contains(material))
|
||||||
{
|
{
|
||||||
players.add(player.getName());
|
players.add(player.getName());
|
||||||
|
if (plugin.al.isAdmin(sender))
|
||||||
|
{
|
||||||
if (doClear && !plugin.al.isAdmin(player))
|
if (doClear && !plugin.al.isAdmin(player))
|
||||||
{
|
{
|
||||||
player.getInventory().remove(material);
|
player.getInventory().remove(material);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (players.isEmpty())
|
if (players.isEmpty())
|
||||||
{
|
{
|
||||||
@ -64,4 +64,30 @@ public class Command_whohas extends FreedomCommand
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static List<String> getAllMaterials()
|
||||||
|
{
|
||||||
|
List<String> names = new ArrayList<>();
|
||||||
|
for (Material material : Material.values())
|
||||||
|
{
|
||||||
|
names.add(material.name());
|
||||||
|
}
|
||||||
|
return names;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> getTabCompleteOptions(CommandSender sender, Command command, String alias, String[] args)
|
||||||
|
{
|
||||||
|
if (args.length == 1)
|
||||||
|
{
|
||||||
|
return getAllMaterials();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (args.length == 2 && plugin.al.isAdmin(sender))
|
||||||
|
{
|
||||||
|
return Arrays.asList("clear");
|
||||||
|
}
|
||||||
|
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,10 +17,12 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.command.PluginCommand;
|
import org.bukkit.command.PluginCommand;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.util.StringUtil;
|
import org.bukkit.util.StringUtil;
|
||||||
|
import org.spigotmc.SpigotConfig;
|
||||||
|
|
||||||
public abstract class FreedomCommand extends AbstractCommandBase<TotalFreedomMod>
|
public abstract class FreedomCommand extends AbstractCommandBase<TotalFreedomMod>
|
||||||
{
|
{
|
||||||
|
|
||||||
|
public static final String UNKNOWN_COMMAND = ChatColor.WHITE + SpigotConfig.unknownCommandMessage;
|
||||||
public static final String YOU_ARE_OP = ChatColor.YELLOW + "You are now op!";
|
public static final String YOU_ARE_OP = ChatColor.YELLOW + "You are now op!";
|
||||||
public static final String YOU_ARE_NOT_OP = ChatColor.YELLOW + "You are no longer op!";
|
public static final String YOU_ARE_NOT_OP = ChatColor.YELLOW + "You are no longer op!";
|
||||||
public static final String PLAYER_NOT_FOUND = ChatColor.GRAY + "Player not found!";
|
public static final String PLAYER_NOT_FOUND = ChatColor.GRAY + "Player not found!";
|
||||||
|
@ -24,6 +24,7 @@ public enum ConfigEntry
|
|||||||
ALLOW_UNSAFE_ENCHANTMENTS(Boolean.class, "allow.unsafe_enchantments"),
|
ALLOW_UNSAFE_ENCHANTMENTS(Boolean.class, "allow.unsafe_enchantments"),
|
||||||
ALLOW_BELLS(Boolean.class, "allow.bells"),
|
ALLOW_BELLS(Boolean.class, "allow.bells"),
|
||||||
ALLOW_ARMOR_STANDS(Boolean.class, "allow.armorstands"),
|
ALLOW_ARMOR_STANDS(Boolean.class, "allow.armorstands"),
|
||||||
|
ALLOW_MINECARTS (Boolean.class, "allow.minecarts"),
|
||||||
//
|
//
|
||||||
BLOCKED_CHATCODES(String.class, "blocked_chatcodes"),
|
BLOCKED_CHATCODES(String.class, "blocked_chatcodes"),
|
||||||
//
|
//
|
||||||
@ -54,9 +55,13 @@ public enum ConfigEntry
|
|||||||
DISCORD_REPORT_CHANNEL_ID(String.class, "discord.report_channel_id"),
|
DISCORD_REPORT_CHANNEL_ID(String.class, "discord.report_channel_id"),
|
||||||
DISCORD_ROLE_SYNC(Boolean.class, "discord.role_sync"),
|
DISCORD_ROLE_SYNC(Boolean.class, "discord.role_sync"),
|
||||||
DISCORD_SERVER_ID(String.class, "discord.server_id"),
|
DISCORD_SERVER_ID(String.class, "discord.server_id"),
|
||||||
|
DISCORD_MASTER_BUILDER_ROLE_ID(String.class, "discord.master_builder_role_id"),
|
||||||
DISCORD_SUPER_ROLE_ID(String.class, "discord.super_role_id"),
|
DISCORD_SUPER_ROLE_ID(String.class, "discord.super_role_id"),
|
||||||
DISCORD_TELNET_ROLE_ID(String.class, "discord.telnet_role_id"),
|
DISCORD_TELNET_ROLE_ID(String.class, "discord.telnet_role_id"),
|
||||||
DISCORD_SENIOR_ROLE_ID(String.class, "discord.senior_role_id"),
|
DISCORD_SENIOR_ROLE_ID(String.class, "discord.senior_role_id"),
|
||||||
|
DISCORD_DEVELOPER_ROLE_ID(String.class, "discord.developer_role_id"),
|
||||||
|
DISCORD_EXECUTIVE_ROLE_ID(String.class, "discord.executive_role_id"),
|
||||||
|
DISCORD_SERVER_OWNER_ROLE_ID(String.class, "discord.server_owner_role_id"),
|
||||||
|
|
||||||
//
|
//
|
||||||
ADMINLIST_CLEAN_THESHOLD_HOURS(Integer.class, "adminlist.clean_threshold_hours"),
|
ADMINLIST_CLEAN_THESHOLD_HOURS(Integer.class, "adminlist.clean_threshold_hours"),
|
||||||
|
@ -25,7 +25,6 @@ import net.dv8tion.jda.core.entities.MessageEmbed;
|
|||||||
import net.dv8tion.jda.core.entities.Role;
|
import net.dv8tion.jda.core.entities.Role;
|
||||||
import net.dv8tion.jda.core.entities.TextChannel;
|
import net.dv8tion.jda.core.entities.TextChannel;
|
||||||
import net.dv8tion.jda.core.managers.GuildController;
|
import net.dv8tion.jda.core.managers.GuildController;
|
||||||
import net.dv8tion.jda.core.requests.restaction.AuditableRestAction;
|
|
||||||
import org.apache.commons.lang.WordUtils;
|
import org.apache.commons.lang.WordUtils;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@ -58,7 +57,7 @@ public class Discord extends FreedomService
|
|||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
bot = new JDABuilder(AccountType.BOT).setToken(ConfigEntry.DISCORD_TOKEN.getString()).addEventListener(new MessageListener()).setAudioEnabled(false).setAutoReconnect(true).buildBlocking();
|
bot = new JDABuilder(AccountType.BOT).setToken(ConfigEntry.DISCORD_TOKEN.getString()).addEventListener(new PrivateMessageListener()).setAudioEnabled(false).setAutoReconnect(true).buildBlocking();
|
||||||
FLog.info("Discord verification bot has successfully enabled!");
|
FLog.info("Discord verification bot has successfully enabled!");
|
||||||
}
|
}
|
||||||
catch (LoginException e)
|
catch (LoginException e)
|
||||||
|
@ -6,7 +6,7 @@ import me.totalfreedom.totalfreedommod.playerverification.VPlayer;
|
|||||||
import net.dv8tion.jda.core.events.message.priv.PrivateMessageReceivedEvent;
|
import net.dv8tion.jda.core.events.message.priv.PrivateMessageReceivedEvent;
|
||||||
import net.dv8tion.jda.core.hooks.ListenerAdapter;
|
import net.dv8tion.jda.core.hooks.ListenerAdapter;
|
||||||
|
|
||||||
public class MessageListener extends ListenerAdapter
|
public class PrivateMessageListener extends ListenerAdapter
|
||||||
{
|
{
|
||||||
public void onPrivateMessageReceived(PrivateMessageReceivedEvent event)
|
public void onPrivateMessageReceived(PrivateMessageReceivedEvent event)
|
||||||
{
|
{
|
@ -142,10 +142,10 @@ public class ItemFun extends FreedomService
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player.getWorld().equals(plugin.wm.hubworld.getWorld()) && plugin.hwr.doRestrict(player))
|
/*if (player.getWorld().equals(plugin.wm.hubworld.getWorld()) && plugin.hwr.doRestrict(player))
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
Location location = player.getLocation().clone();
|
Location location = player.getLocation().clone();
|
||||||
|
|
||||||
|
@ -39,12 +39,13 @@ public class HubWorldRestrictions extends FreedomService
|
|||||||
|
|
||||||
public boolean doRestrict(Player player)
|
public boolean doRestrict(Player player)
|
||||||
{
|
{
|
||||||
if (!FUtil.isExecutive(player.getName()) && player.getWorld().equals(plugin.wm.hubworld.getWorld()))
|
/*if (!FUtil.isExecutive(player.getName()) && player.getWorld().equals(plugin.wm.hubworld.getWorld()))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;*/
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.NORMAL)
|
@EventHandler(priority = EventPriority.NORMAL)
|
||||||
|
@ -23,7 +23,7 @@ public class WorldManager extends FreedomService
|
|||||||
public Flatlands flatlands;
|
public Flatlands flatlands;
|
||||||
public AdminWorld adminworld;
|
public AdminWorld adminworld;
|
||||||
public MasterBuilderWorld masterBuilderWorld;
|
public MasterBuilderWorld masterBuilderWorld;
|
||||||
public HubWorld hubworld;
|
//public HubWorld hubworld;
|
||||||
|
|
||||||
public WorldManager(TotalFreedomMod plugin)
|
public WorldManager(TotalFreedomMod plugin)
|
||||||
{
|
{
|
||||||
@ -32,7 +32,7 @@ public class WorldManager extends FreedomService
|
|||||||
this.flatlands = new Flatlands();
|
this.flatlands = new Flatlands();
|
||||||
this.adminworld = new AdminWorld();
|
this.adminworld = new AdminWorld();
|
||||||
this.masterBuilderWorld = new MasterBuilderWorld();
|
this.masterBuilderWorld = new MasterBuilderWorld();
|
||||||
this.hubworld = new HubWorld();
|
//this.hubworld = new HubWorld();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -41,7 +41,7 @@ public class WorldManager extends FreedomService
|
|||||||
flatlands.getWorld();
|
flatlands.getWorld();
|
||||||
adminworld.getWorld();
|
adminworld.getWorld();
|
||||||
masterBuilderWorld.getWorld();
|
masterBuilderWorld.getWorld();
|
||||||
hubworld.getWorld();
|
//hubworld.getWorld();
|
||||||
|
|
||||||
// Disable weather
|
// Disable weather
|
||||||
if (ConfigEntry.DISABLE_WEATHER.getBoolean())
|
if (ConfigEntry.DISABLE_WEATHER.getBoolean())
|
||||||
@ -62,7 +62,7 @@ public class WorldManager extends FreedomService
|
|||||||
flatlands.getWorld().save();
|
flatlands.getWorld().save();
|
||||||
adminworld.getWorld().save();
|
adminworld.getWorld().save();
|
||||||
masterBuilderWorld.getWorld().save();
|
masterBuilderWorld.getWorld().save();
|
||||||
hubworld.getWorld().save();
|
//hubworld.getWorld().save();
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||||
@ -113,10 +113,10 @@ public class WorldManager extends FreedomService
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (event.getWorld().equals(hubworld.getWorld()) && hubworld.getWeatherMode() != WorldWeather.OFF)
|
/*else if (event.getWorld().equals(hubworld.getWorld()) && hubworld.getWeatherMode() != WorldWeather.OFF)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@ -141,10 +141,10 @@ public class WorldManager extends FreedomService
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (event.getWorld().equals(hubworld.getWorld()) && hubworld.getWeatherMode() != WorldWeather.OFF)
|
/*else if (event.getWorld().equals(hubworld.getWorld()) && hubworld.getWeatherMode() != WorldWeather.OFF)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -49,12 +49,21 @@ discord:
|
|||||||
report_channel_id: ''
|
report_channel_id: ''
|
||||||
# Do you want roles to sync with the server?
|
# Do you want roles to sync with the server?
|
||||||
role_sync: false
|
role_sync: false
|
||||||
|
# Master Admin role ID
|
||||||
|
master_builder_role_id: ''
|
||||||
# Super Admin role ID
|
# Super Admin role ID
|
||||||
super_role_id: ''
|
super_role_id: ''
|
||||||
# Telnet Admin role ID
|
# Telnet Admin role ID
|
||||||
telnet_role_id: ''
|
telnet_role_id: ''
|
||||||
# Senior Admin role ID
|
# Senior Admin role ID
|
||||||
senior_role_id: ''
|
senior_role_id: ''
|
||||||
|
# Developer role ID
|
||||||
|
developer_role_id: ''
|
||||||
|
# Executive Admin role ID
|
||||||
|
executive_role_id: ''
|
||||||
|
# Owner role ID
|
||||||
|
server_owner_role_id: ''
|
||||||
|
|
||||||
|
|
||||||
# Admin list
|
# Admin list
|
||||||
adminlist:
|
adminlist:
|
||||||
@ -90,8 +99,6 @@ social_links:
|
|||||||
Forum: 'https://totalfreedom.boards.net/'
|
Forum: 'https://totalfreedom.boards.net/'
|
||||||
Website: 'https://totalfreedom.me/'
|
Website: 'https://totalfreedom.me/'
|
||||||
Discord: 'https://discordapp.com/invite/XXjmAmV/'
|
Discord: 'https://discordapp.com/invite/XXjmAmV/'
|
||||||
Twitter: 'https://twitter.com/TotalFreedomMC'
|
|
||||||
|
|
||||||
|
|
||||||
# Blocking certain events
|
# Blocking certain events
|
||||||
allow:
|
allow:
|
||||||
@ -109,6 +116,7 @@ allow:
|
|||||||
unsafe_enchantments: true
|
unsafe_enchantments: true
|
||||||
bells: true
|
bells: true
|
||||||
armorstands: false
|
armorstands: false
|
||||||
|
minecarts: false
|
||||||
|
|
||||||
# Blocked commands:
|
# Blocked commands:
|
||||||
#
|
#
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
#
|
|
||||||
# Config version
|
|
||||||
#
|
|
||||||
version: 1
|
|
Loading…
Reference in New Issue
Block a user