Skip to content

Commit

Permalink
2.3.5 - Version
Browse files Browse the repository at this point in the history
Shows no perms when users don't have them.
  • Loading branch information
Nutty101 committed Nov 21, 2018
1 parent 11c6955 commit 4c82f60
Show file tree
Hide file tree
Showing 97 changed files with 1,721 additions and 761 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.iml
*.class
46 changes: 46 additions & 0 deletions Api/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>net.livecar.nuttyworks.npc_destinations</groupId>
<artifactId>NPCDestinations-parent</artifactId>
<version>2.2.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>NPCDestinations-Api</artifactId>

<dependencies>
<!--Bukkit API-->
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.13-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.citizensnpcs</groupId>
<artifactId>citizens</artifactId>
<version>2.0.24-SNAPSHOT</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<!-- WorldGuard -->
<dependency>
<groupId>com.sk89q.worldguard</groupId>
<artifactId>worldguard-legacy</artifactId>
<version>6.2</version>
<scope>provided</scope>
</dependency>
<!-- WorldEdit -->
<dependency>
<groupId>com.sk89q</groupId>
<artifactId>worldedit</artifactId>
<version>6.0.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>


</project>
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ enum inHandLightSource
NOLIGHT
}

public enum SLABTYPE {
enum SLABTYPE {
TOP,
BOTTOM,
DOUBLE,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package net.livecar.nuttyworks.npc_destinations.worldguard;

import java.util.List;

import org.bukkit.Location;
import org.bukkit.World;
import com.sk89q.worldguard.protection.managers.RegionManager;

public interface WorldGuardInterface {

enum RegionShape {
CUBOID,
POLYGON,
GLOBAL
}

RegionManager getRegionManager(World world);

void registerFlags();

void unregisterFlags();

void registerEvents();

void checkWorld();

List<String> getRegionList(World world);

Location[] getRegionBounds(World world, String regionName);

boolean isInRegion(Location location, String regionName);

RegionShape getRegionShape(Location location, String regionName);

}
225 changes: 225 additions & 0 deletions Plugin/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>net.livecar.nuttyworks.npc_destinations</groupId>
<artifactId>NPCDestinations-parent</artifactId>
<version>2.2.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>NPC_Destinations-Plugin</artifactId>

<dependencies>
<!-- NPC_Destinations Api -->
<dependency>
<groupId>net.livecar.nuttyworks.npc_destinations</groupId>
<artifactId>NPCDestinations-Api</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>net.livecar.nuttyworks.npc_destinations</groupId>
<artifactId>NPCDestinations-v1_13_R2</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>net.livecar.nuttyworks.npc_destinations</groupId>
<artifactId>NPCDestinations-v1_12_R1</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>net.livecar.nuttyworks.npc_destinations</groupId>
<artifactId>NPCDestinations-v1_11_R1</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>net.livecar.nuttyworks.npc_destinations</groupId>
<artifactId>NPCDestinations-v1_10_R1</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>net.livecar.nuttyworks.npc_destinations</groupId>
<artifactId>NPCDestinations-v1_9_R2</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>net.livecar.nuttyworks.npc_destinations</groupId>
<artifactId>NPCDestinations-v1_9_R1</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>net.livecar.nuttyworks.npc_destinations</groupId>
<artifactId>NPCDestinations-v1_8_R3</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>net.livecar.nuttyworks.npc_destinations</groupId>
<artifactId>NPCDestinations-WG6_2_2</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>net.livecar.nuttyworks.npc_destinations</groupId>
<artifactId>NPCDestinations-WG7_0_0</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>net.livecar.nuttyworks.npc_destinations</groupId>
<artifactId>NPCDestinations-WG7_0_1</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<!--Bukkit API-->
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.13-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.citizensnpcs</groupId>
<artifactId>citizens</artifactId>
<version>2.0.24-SNAPSHOT</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mcmonkey</groupId>
<artifactId>sentinel</artifactId>
<version>1.6.2</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.8</version>
<scope>provided</scope>
</dependency>
<!-- BetonQuest -->
<dependency>
<groupId>pl.betoncraft.betonquest</groupId>
<artifactId>BetonQuest</artifactId>
<version>1.9</version>
<scope>provided</scope>
</dependency>
<!-- WorldGuard -->
<dependency>
<groupId>com.sk89q.worldguard</groupId>
<artifactId>worldguard-legacy</artifactId>
<version>6.2</version>
<scope>provided</scope>
</dependency>
<!-- WorldEdit -->
<dependency>
<groupId>com.sk89q</groupId>
<artifactId>worldedit</artifactId>
<version>6.0.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>ru.beykerykt</groupId>
<artifactId>lightapi</artifactId>
<version>3.2.7</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.gamingmesh.jobs</groupId>
<artifactId>Jobs</artifactId>
<version>4.8.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.intellectualcrafters</groupId>
<artifactId>plot</artifactId>
<version>18.09.09</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sk89q</groupId>
<artifactId>worldguard</artifactId>
<version>7.0.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<directory>../target</directory> <!-- Build it one level up, because it is the one we care about -->
<finalName>NPC_Destinations</finalName>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<archive>
<manifestEntries>
<Main-Class>net.livecar.nuttyworks.npc_destinations.DestinationsPlugin</Main-Class>
<Implementation-Version>${maven.build.timestamp}</Implementation-Version>
<Specification-Version>${maven.build.timestamp}</Specification-Version>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>**/*.java</exclude>
<exclude>**/*.SF</exclude>
<exclude>**/*.DSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</plugin>
</plugins>

</build>



</project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import net.citizensnpcs.api.event.CitizensDisableEvent;
import net.livecar.nuttyworks.npc_destinations.worldguard.WorldGuard_6_2_2;
import net.livecar.nuttyworks.npc_destinations.worldguard.WorldGuard_7_0_0;
import net.livecar.nuttyworks.npc_destinations.worldguard.WorldGuard_7_0_1;
import net.livecar.nuttyworks.npc_destinations.worldguard.WorldGuardInterface;
import net.livecar.nuttyworks.npc_destinations.bridges.*;
import net.livecar.nuttyworks.npc_destinations.citizens.Citizens_Processing;
Expand Down Expand Up @@ -137,10 +138,12 @@ public void onLoad() {
if (!goodVersion) {
getServer().getLogger().log(Level.WARNING, "This Worldguard version is not supported, custom flags are not enabled");
} else {
if (majorVersion == 6)
if (majorVersion == 6 && WorldGuard_6_2_2.isValidVersion())
this.getWorldGuardPlugin = new WorldGuard_6_2_2(this);
else if (majorVersion == 7)
else if (majorVersion == 7 && WorldGuard_7_0_0.isValidVersion())
this.getWorldGuardPlugin = new WorldGuard_7_0_0(this);
else if (majorVersion == 7 && WorldGuard_7_0_1.isValidVersion())
this.getWorldGuardPlugin = new WorldGuard_7_0_1(this);
this.getWorldGuardPlugin.registerFlags();
}
}
Expand Down Expand Up @@ -173,8 +176,6 @@ public void onEnable() {
if (this.currentLanguage.equalsIgnoreCase("en-default"))
this.currentLanguage = "en_def";

if (this.getDefaultConfig.contains("debug"))
this.debugLogLevel = Level.parse(this.getDefaultConfig.getString("debug"));
if (this.getDefaultConfig.contains("max-distance"))
this.maxDistance = this.getDefaultConfig.getInt("max-distance", 500);
if (this.getDefaultConfig.contains("max-distance"))
Expand Down
Loading

0 comments on commit 4c82f60

Please sign in to comment.