mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Fixed pom, added tprandom, admins can now kick other admins (#21)
* Fixed pom, added tprandom, admins can now kick other admins * went too fast * im mental
This commit is contained in:
parent
7c3ea836e7
commit
9b6394c8c6
43
pom.xml
43
pom.xml
@ -54,10 +54,6 @@
|
||||
<id>spigot-repo</id>
|
||||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
||||
</repository>
|
||||
<!-- <repository>
|
||||
<id>elmakers-repo</id>
|
||||
<url>http://maven.elmakers.com/repository/</url>
|
||||
</repository>-->
|
||||
<repository>
|
||||
<id>sk89q-repo</id>
|
||||
<url>http://maven.sk89q.com/repo/</url>
|
||||
@ -86,22 +82,24 @@
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.16.18</version>
|
||||
<version>1.16.20</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
<version>1.12-pre5-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
<version>1.12.2</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/spigot-1.12.2.jar</systemPath>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.Pravian</groupId>
|
||||
<artifactId>Aero</artifactId>
|
||||
<version>2.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/aero-2.1-SNAPSHOT.jar</systemPath>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@ -122,28 +120,24 @@
|
||||
<groupId>com.sk89q</groupId>
|
||||
<artifactId>worldguard</artifactId>
|
||||
<version>6.2</version>
|
||||
<scope>provided</scope>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/worldguard-6.2.jar</systemPath>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.TotalFreedom.TF-WorldEdit</groupId>
|
||||
<artifactId>worldedit-bukkit</artifactId>
|
||||
<version>6.1.0-TF</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.TotalFreedom.TF-WorldEdit</groupId>
|
||||
<artifactId>worldedit-core</artifactId>
|
||||
<version>6.1.0-TF</version>
|
||||
<scope>provided</scope>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/TF-WorldEdit.jar</systemPath>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.coreprotect</groupId>
|
||||
<artifactId>CoreProtect</artifactId>
|
||||
<version>2.14.2</version>
|
||||
<scope>provided</scope>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/CoreProtect_2.14.2.jar</systemPath>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@ -154,16 +148,19 @@
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>minecraft.server</groupId>
|
||||
<artifactId>Spigot</artifactId>
|
||||
<version>1.12</version>
|
||||
<scope>provided</scope>
|
||||
<groupId>org.spigot</groupId>
|
||||
<artifactId>spigot</artifactId>
|
||||
<version>1.12.2</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/spigot-1.12.2.jar</systemPath>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.dv8tion</groupId>
|
||||
<artifactId>JDA</artifactId>
|
||||
<version>3.4.0_317-withDependencies</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/JDA-3.4.0_317-withDependencies.jar</systemPath>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
@ -313,7 +310,7 @@
|
||||
</plugin>
|
||||
|
||||
<!-- Maven shade -->
|
||||
<plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>1.4</version>
|
||||
|
@ -28,12 +28,6 @@ public class Command_kick extends FreedomCommand
|
||||
return true;
|
||||
}
|
||||
|
||||
if (isAdmin(player))
|
||||
{
|
||||
msg("Admins can not be kicked", ChatColor.RED);
|
||||
return true;
|
||||
}
|
||||
|
||||
String reason = null;
|
||||
if (args.length > 1)
|
||||
{
|
||||
|
@ -0,0 +1,27 @@
|
||||
package me.totalfreedom.totalfreedommod.command;
|
||||
|
||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||
@CommandParameters(description = "Go to a random place in the current world you are in", usage = "/<command>", aliases = "tpr")
|
||||
public class Command_tprandom extends FreedomCommand
|
||||
{
|
||||
|
||||
@Override
|
||||
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||
{
|
||||
int x = FUtil.random(-10000, 10000);
|
||||
int z = FUtil.random(-10000, 10000);
|
||||
int y = playerSender.getWorld().getHighestBlockYAt(x, z);
|
||||
Location location = new Location(playerSender.getLocation().getWorld(), x, y, z);
|
||||
playerSender.teleport(location);
|
||||
msg("Poof!", ChatColor.GREEN);
|
||||
return true;
|
||||
}
|
||||
}
|
@ -420,4 +420,11 @@ public class FUtil
|
||||
String packageName = Bukkit.getServer().getClass().getPackage().getName();
|
||||
return packageName.substring(packageName.lastIndexOf('.') + 1);
|
||||
}
|
||||
|
||||
public static int random(int min, int max)
|
||||
{
|
||||
int range = max - min + 1;
|
||||
int value = (int) (Math.random() * range) + min;
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user