mirror of
https://github.com/TotalFreedomMC/TF-WorldGuardExtraFlagsPlugin.git
synced 2024-12-27 17:44:47 +00:00
It should compile now + update FAWE api
This commit is contained in:
parent
a39e101776
commit
cf1b12cd9a
5 changed files with 61 additions and 53 deletions
|
@ -17,7 +17,7 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<version>3.3.1-SNAPSHOT</version>
|
<version>3.3.0</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
|
@ -125,13 +125,13 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.sk89q.worldedit</groupId>
|
<groupId>com.sk89q.worldedit</groupId>
|
||||||
<artifactId>worldedit-bukkit</artifactId>
|
<artifactId>worldedit-bukkit</artifactId>
|
||||||
<version>7.0.0-SNAPSHOT</version>
|
<version>7.0.0</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.sk89q.worldguard</groupId>
|
<groupId>com.sk89q.worldguard</groupId>
|
||||||
<artifactId>worldguard-bukkit</artifactId>
|
<artifactId>worldguard-bukkit</artifactId>
|
||||||
<version>7.0.0-SNAPSHOT</version>
|
<version>7.0.0</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -141,11 +141,25 @@
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.boydti</groupId>
|
<groupId>com.fastasyncworldedit</groupId>
|
||||||
<artifactId>fawe-api</artifactId>
|
<artifactId>FastAsyncWorldEdit-Core</artifactId>
|
||||||
<version>18.07.27-3ed2e57-1163-20.5.2</version>
|
<version>2.0.1</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- FAWE Bukkit API -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fastasyncworldedit</groupId>
|
||||||
|
<artifactId>FastAsyncWorldEdit-Bukkit</artifactId>
|
||||||
|
<version>2.0.1</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>FastAsyncWorldEdit-Core</artifactId>
|
||||||
|
<groupId>*</groupId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.comphenix.protocol</groupId>
|
<groupId>com.comphenix.protocol</groupId>
|
||||||
<artifactId>ProtocolLib</artifactId>
|
<artifactId>ProtocolLib</artifactId>
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
package net.goldtreeservers.worldguardextraflags.fawe;
|
package net.goldtreeservers.worldguardextraflags.fawe;
|
||||||
|
|
||||||
|
import com.fastasyncworldedit.core.regions.FaweMask;
|
||||||
|
import com.fastasyncworldedit.core.regions.FaweMaskManager;
|
||||||
|
import com.sk89q.worldedit.entity.Player;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
import com.boydti.fawe.FaweAPI;
|
import com.fastasyncworldedit.core.FaweAPI;
|
||||||
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
@ -16,6 +19,13 @@ public class FAWEHelper
|
||||||
|
|
||||||
public void onEnable()
|
public void onEnable()
|
||||||
{
|
{
|
||||||
FaweAPI.addMaskManager(new FaweWorldEditFlagMaskManager(this.plugin));
|
FaweAPI.addMaskManager(new FaweMaskManager("WorldGuardExtraFlags")
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public FaweMask getMask(Player player, MaskType type, boolean isWhitelist)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
package net.goldtreeservers.worldguardextraflags.fawe;
|
package net.goldtreeservers.worldguardextraflags.fawe;
|
||||||
|
|
||||||
|
import com.fastasyncworldedit.core.regions.FaweMask;
|
||||||
|
import com.fastasyncworldedit.core.regions.FaweMaskManager;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.boydti.fawe.object.FawePlayer;
|
|
||||||
import com.boydti.fawe.regions.FaweMask;
|
|
||||||
import com.boydti.fawe.regions.FaweMaskManager;
|
|
||||||
import com.sk89q.worldguard.LocalPlayer;
|
import com.sk89q.worldguard.LocalPlayer;
|
||||||
import com.sk89q.worldguard.protection.ApplicableRegionSet;
|
import com.sk89q.worldguard.protection.ApplicableRegionSet;
|
||||||
import com.sk89q.worldguard.protection.flags.StateFlag.State;
|
import com.sk89q.worldguard.protection.flags.StateFlag.State;
|
||||||
|
@ -15,7 +14,7 @@ import net.goldtreeservers.worldguardextraflags.WorldGuardExtraFlagsPlugin;
|
||||||
import net.goldtreeservers.worldguardextraflags.flags.Flags;
|
import net.goldtreeservers.worldguardextraflags.flags.Flags;
|
||||||
import net.goldtreeservers.worldguardextraflags.wg.wrappers.AbstractRegionManagerWrapper;
|
import net.goldtreeservers.worldguardextraflags.wg.wrappers.AbstractRegionManagerWrapper;
|
||||||
|
|
||||||
public class FaweWorldEditFlagMaskManager extends FaweMaskManager<Player>
|
public class FaweWorldEditFlagMaskManager extends FaweMaskManager
|
||||||
{
|
{
|
||||||
private final WorldGuardExtraFlagsPlugin plugin;
|
private final WorldGuardExtraFlagsPlugin plugin;
|
||||||
|
|
||||||
|
@ -53,41 +52,8 @@ public class FaweWorldEditFlagMaskManager extends FaweMaskManager<Player>
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FaweMask getMask(FawePlayer<Player> fawePlayer)
|
public FaweMask getMask(com.sk89q.worldedit.entity.Player player, MaskType type, boolean isWhitelist)
|
||||||
{
|
|
||||||
return null; //Problems here due to FaweMask using LocalWorld
|
|
||||||
|
|
||||||
/*final Player player = fawePlayer.parent;
|
|
||||||
final Location location = player.getLocation();
|
|
||||||
final ProtectedRegion myregion = this.getRegion(player, location);
|
|
||||||
|
|
||||||
if (myregion != null)
|
|
||||||
{
|
|
||||||
final BlockVector pos1;
|
|
||||||
final BlockVector pos2;
|
|
||||||
if (myregion.getId().equals("__global__"))
|
|
||||||
{
|
|
||||||
pos1 = new BlockVector(Integer.MIN_VALUE, 0, Integer.MIN_VALUE);
|
|
||||||
pos2 = new BlockVector(Integer.MAX_VALUE, 255, Integer.MAX_VALUE);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pos1 = new BlockVector(myregion.getMinimumPoint().getBlockX(), myregion.getMinimumPoint().getBlockY(), myregion.getMinimumPoint().getBlockZ());
|
|
||||||
pos2 = new BlockVector(myregion.getMaximumPoint().getBlockX(), myregion.getMaximumPoint().getBlockY(), myregion.getMaximumPoint().getBlockZ());
|
|
||||||
}
|
|
||||||
|
|
||||||
return new FaweMask(pos1, pos2)
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public String getName()
|
|
||||||
{
|
|
||||||
return myregion.getId();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
18
WG/pom.xml
18
WG/pom.xml
|
@ -52,6 +52,24 @@
|
||||||
<version>7.0.0</version>
|
<version>7.0.0</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.sk89q.worldedit.worldedit-libs</groupId>
|
||||||
|
<artifactId>core</artifactId>
|
||||||
|
<version>7.0.0</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.sk89q.worldedit.worldedit-libs</groupId>
|
||||||
|
<artifactId>bukkit</artifactId>
|
||||||
|
<version>7.0.0</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.sk89q.intake</groupId>
|
||||||
|
<artifactId>intake</artifactId>
|
||||||
|
<version>4.2-SNAPSHOT</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.sk89q.worldguard</groupId>
|
<groupId>com.sk89q.worldguard</groupId>
|
||||||
<artifactId>worldguard-core</artifactId>
|
<artifactId>worldguard-core</artifactId>
|
||||||
|
|
4
pom.xml
4
pom.xml
|
@ -15,8 +15,8 @@
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.8.1</version>
|
<version>3.8.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>17</source>
|
<source>11</source>
|
||||||
<target>17</target>
|
<target>11</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
|
|
Loading…
Reference in a new issue