mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Update CoreProtect and masterbuilder restrictions (#100)
* Update CoreProtect and masterbuilder restrictions * intellij is gay shit
This commit is contained in:
parent
655766a0c4
commit
519b456807
@ -57,7 +57,7 @@
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.neovisionaries:nv-websocket-client:2.4" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.squareup.okhttp3:okhttp:3.8.1" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.squareup.okio:okio:1.13.0" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.coreprotect:CoreProtect:2.14.2" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.coreprotect:coreprotect:2.15.0" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q.worldguard:worldguard-legacy:6.2" level="project" />
|
||||
</component>
|
||||
</module>
|
8
pom.xml
8
pom.xml
@ -76,8 +76,8 @@
|
||||
</repository>
|
||||
|
||||
<repository>
|
||||
<id>robomwm</id>
|
||||
<url>https://dl.bintray.com/robomwm/maven</url>
|
||||
<id>playpro</id>
|
||||
<url>https://maven.playpro.com/</url>
|
||||
</repository>
|
||||
|
||||
<repository>
|
||||
@ -162,8 +162,8 @@
|
||||
|
||||
<dependency>
|
||||
<groupId>net.coreprotect</groupId>
|
||||
<artifactId>CoreProtect</artifactId>
|
||||
<version>2.14.2</version>
|
||||
<artifactId>coreprotect</artifactId>
|
||||
<version>2.15.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
@ -176,7 +176,7 @@ public class TotalFreedomMod extends AeroPlugin<TotalFreedomMod>
|
||||
nu = services.registerService(AntiNuke.class);
|
||||
as = services.registerService(AntiSpam.class);
|
||||
mbl = services.registerService(MasterBuilderList.class);
|
||||
//mbwr = services.registerService(MasterBuilderWorldRestrictions.class);
|
||||
mbwr = services.registerService(MasterBuilderWorldRestrictions.class);
|
||||
|
||||
pl = services.registerService(PlayerList.class);
|
||||
an = services.registerService(Announcer.class);
|
||||
|
@ -56,7 +56,7 @@ public class Command_gtfo extends FreedomCommand
|
||||
// Deop
|
||||
player.setOp(false);
|
||||
|
||||
// Gamemode suvival
|
||||
// Gamemode survival
|
||||
player.setGameMode(GameMode.SURVIVAL);
|
||||
|
||||
// Clear inventory
|
||||
@ -95,7 +95,7 @@ public class Command_gtfo extends FreedomCommand
|
||||
}
|
||||
}
|
||||
|
||||
//checks if there is CoreProtect loaded and installed, if not it skips the rollback and uses CoreProtect directly
|
||||
// Checks if CoreProtect is loaded and installed, and skips the rollback and uses CoreProtect directly
|
||||
if (!cancelRollback)
|
||||
{
|
||||
if (!plugin.cpb.isEnabled())
|
||||
@ -111,7 +111,6 @@ public class Command_gtfo extends FreedomCommand
|
||||
|
||||
// Rollback
|
||||
plugin.rb.rollback(username);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1,7 +1,5 @@
|
||||
package me.totalfreedom.totalfreedommod.command;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import me.totalfreedom.totalfreedommod.banning.Ban;
|
||||
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||
@ -11,6 +9,9 @@ import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||
@CommandParameters(description = "Unbans a player", usage = "/<command> <username>")
|
||||
public class Command_unban extends FreedomCommand
|
||||
|
@ -139,7 +139,7 @@ public class ItemFun extends FreedomService
|
||||
|
||||
Location location = player.getLocation().clone();
|
||||
|
||||
Vector playerPostion = location.toVector().add(new Vector(0.0, 1.65, 0.0));
|
||||
Vector playerPosition = location.toVector().add(new Vector(0.0, 1.65, 0.0));
|
||||
Vector playerDirection = location.getDirection().normalize();
|
||||
|
||||
double distance = 150.0;
|
||||
@ -154,7 +154,7 @@ public class ItemFun extends FreedomService
|
||||
Block lastBlock = null;
|
||||
for (double offset = 0.0; offset <= distance; offset += (distance / 25.0))
|
||||
{
|
||||
Block block = playerPostion.clone().add(playerDirection.clone().multiply(offset)).toLocation(player.getWorld()).getBlock();
|
||||
Block block = playerPosition.clone().add(playerDirection.clone().multiply(offset)).toLocation(player.getWorld()).getBlock();
|
||||
|
||||
if (!block.equals(lastBlock))
|
||||
{
|
||||
|
@ -3,10 +3,10 @@ package me.totalfreedom.totalfreedommod.fun;
|
||||
import me.totalfreedom.totalfreedommod.FreedomService;
|
||||
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class MobStacker extends FreedomService
|
||||
@ -49,8 +49,5 @@ public class MobStacker extends FreedomService
|
||||
event.setCancelled(true);
|
||||
attacker.addPassenger(event.getEntity());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -48,10 +48,10 @@ public class Trailer extends FreedomService
|
||||
return;
|
||||
}
|
||||
|
||||
//if (event.getPlayer().getWorld().equals(plugin.wm.masterBuilderWorld.getWorld()))
|
||||
//{
|
||||
// return;
|
||||
//}
|
||||
if (event.getPlayer().getWorld().equals(plugin.wm.masterBuilderWorld.getWorld()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Block fromBlock = event.getFrom().getBlock();
|
||||
if (!fromBlock.isEmpty())
|
||||
|
@ -1,6 +1,7 @@
|
||||
package me.totalfreedom.totalfreedommod.util;
|
||||
|
||||
import org.bukkit.Material;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -36,10 +36,9 @@ public class WorldManager extends FreedomService
|
||||
@Override
|
||||
protected void onStart()
|
||||
{
|
||||
// Disabled temporarily
|
||||
flatlands.getWorld();
|
||||
//adminworld.getWorld();
|
||||
//masterBuilderWorld.getWorld();
|
||||
adminworld.getWorld();
|
||||
masterBuilderWorld.getWorld();
|
||||
|
||||
// Disable weather
|
||||
if (ConfigEntry.DISABLE_WEATHER.getBoolean())
|
||||
@ -57,9 +56,9 @@ public class WorldManager extends FreedomService
|
||||
@Override
|
||||
protected void onStop()
|
||||
{
|
||||
//flatlands.getWorld().save();
|
||||
//adminworld.getWorld().save();
|
||||
//masterBuilderWorld.getWorld().save();
|
||||
flatlands.getWorld().save();
|
||||
adminworld.getWorld().save();
|
||||
masterBuilderWorld.getWorld().save();
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
|
Loading…
Reference in New Issue
Block a user