mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-30 02:05:41 +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.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.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: 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" />
|
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q.worldguard:worldguard-legacy:6.2" level="project" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
8
pom.xml
8
pom.xml
@ -76,8 +76,8 @@
|
|||||||
</repository>
|
</repository>
|
||||||
|
|
||||||
<repository>
|
<repository>
|
||||||
<id>robomwm</id>
|
<id>playpro</id>
|
||||||
<url>https://dl.bintray.com/robomwm/maven</url>
|
<url>https://maven.playpro.com/</url>
|
||||||
</repository>
|
</repository>
|
||||||
|
|
||||||
<repository>
|
<repository>
|
||||||
@ -162,8 +162,8 @@
|
|||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.coreprotect</groupId>
|
<groupId>net.coreprotect</groupId>
|
||||||
<artifactId>CoreProtect</artifactId>
|
<artifactId>coreprotect</artifactId>
|
||||||
<version>2.14.2</version>
|
<version>2.15.0</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@ public class TotalFreedomMod extends AeroPlugin<TotalFreedomMod>
|
|||||||
nu = services.registerService(AntiNuke.class);
|
nu = services.registerService(AntiNuke.class);
|
||||||
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);
|
||||||
|
|
||||||
pl = services.registerService(PlayerList.class);
|
pl = services.registerService(PlayerList.class);
|
||||||
an = services.registerService(Announcer.class);
|
an = services.registerService(Announcer.class);
|
||||||
|
@ -56,7 +56,7 @@ public class Command_gtfo extends FreedomCommand
|
|||||||
// Deop
|
// Deop
|
||||||
player.setOp(false);
|
player.setOp(false);
|
||||||
|
|
||||||
// Gamemode suvival
|
// Gamemode survival
|
||||||
player.setGameMode(GameMode.SURVIVAL);
|
player.setGameMode(GameMode.SURVIVAL);
|
||||||
|
|
||||||
// Clear inventory
|
// 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 (!cancelRollback)
|
||||||
{
|
{
|
||||||
if (!plugin.cpb.isEnabled())
|
if (!plugin.cpb.isEnabled())
|
||||||
@ -111,7 +111,6 @@ public class Command_gtfo extends FreedomCommand
|
|||||||
|
|
||||||
// Rollback
|
// Rollback
|
||||||
plugin.rb.rollback(username);
|
plugin.rb.rollback(username);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import me.totalfreedom.totalfreedommod.banning.Ban;
|
import me.totalfreedom.totalfreedommod.banning.Ban;
|
||||||
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
||||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||||
@ -11,6 +9,9 @@ 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;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Unbans a player", usage = "/<command> <username>")
|
@CommandParameters(description = "Unbans a player", usage = "/<command> <username>")
|
||||||
public class Command_unban extends FreedomCommand
|
public class Command_unban extends FreedomCommand
|
||||||
|
@ -139,7 +139,7 @@ public class ItemFun extends FreedomService
|
|||||||
|
|
||||||
Location location = player.getLocation().clone();
|
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();
|
Vector playerDirection = location.getDirection().normalize();
|
||||||
|
|
||||||
double distance = 150.0;
|
double distance = 150.0;
|
||||||
@ -154,7 +154,7 @@ public class ItemFun extends FreedomService
|
|||||||
Block lastBlock = null;
|
Block lastBlock = null;
|
||||||
for (double offset = 0.0; offset <= distance; offset += (distance / 25.0))
|
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))
|
if (!block.equals(lastBlock))
|
||||||
{
|
{
|
||||||
|
@ -3,10 +3,10 @@ package me.totalfreedom.totalfreedommod.fun;
|
|||||||
import me.totalfreedom.totalfreedommod.FreedomService;
|
import me.totalfreedom.totalfreedommod.FreedomService;
|
||||||
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
|
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
public class MobStacker extends FreedomService
|
public class MobStacker extends FreedomService
|
||||||
@ -35,7 +35,7 @@ public class MobStacker extends FreedomService
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Player attacker = (Player)event.getDamager();
|
Player attacker = (Player) event.getDamager();
|
||||||
|
|
||||||
if (!plugin.al.isAdmin(attacker))
|
if (!plugin.al.isAdmin(attacker))
|
||||||
{
|
{
|
||||||
@ -49,8 +49,5 @@ public class MobStacker extends FreedomService
|
|||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
attacker.addPassenger(event.getEntity());
|
attacker.addPassenger(event.getEntity());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -48,10 +48,10 @@ public class Trailer extends FreedomService
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (event.getPlayer().getWorld().equals(plugin.wm.masterBuilderWorld.getWorld()))
|
if (event.getPlayer().getWorld().equals(plugin.wm.masterBuilderWorld.getWorld()))
|
||||||
//{
|
{
|
||||||
// return;
|
return;
|
||||||
//}
|
}
|
||||||
|
|
||||||
Block fromBlock = event.getFrom().getBlock();
|
Block fromBlock = event.getFrom().getBlock();
|
||||||
if (!fromBlock.isEmpty())
|
if (!fromBlock.isEmpty())
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package me.totalfreedom.totalfreedommod.util;
|
package me.totalfreedom.totalfreedommod.util;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -36,10 +36,9 @@ public class WorldManager extends FreedomService
|
|||||||
@Override
|
@Override
|
||||||
protected void onStart()
|
protected void onStart()
|
||||||
{
|
{
|
||||||
// Disabled temporarily
|
|
||||||
flatlands.getWorld();
|
flatlands.getWorld();
|
||||||
//adminworld.getWorld();
|
adminworld.getWorld();
|
||||||
//masterBuilderWorld.getWorld();
|
masterBuilderWorld.getWorld();
|
||||||
|
|
||||||
// Disable weather
|
// Disable weather
|
||||||
if (ConfigEntry.DISABLE_WEATHER.getBoolean())
|
if (ConfigEntry.DISABLE_WEATHER.getBoolean())
|
||||||
@ -57,9 +56,9 @@ public class WorldManager extends FreedomService
|
|||||||
@Override
|
@Override
|
||||||
protected void onStop()
|
protected void onStop()
|
||||||
{
|
{
|
||||||
//flatlands.getWorld().save();
|
flatlands.getWorld().save();
|
||||||
//adminworld.getWorld().save();
|
adminworld.getWorld().save();
|
||||||
//masterBuilderWorld.getWorld().save();
|
masterBuilderWorld.getWorld().save();
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||||
|
Loading…
Reference in New Issue
Block a user