mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-07-01 04:26:42 +00:00
Compare commits
10 Commits
FS-283
...
RELEASE-20
Author | SHA1 | Date | |
---|---|---|---|
9155ac90b5 | |||
1e1367d08f | |||
3f690e2ca1 | |||
abfa3b977c | |||
a728ec24d4 | |||
74a71b1843 | |||
4d469cdc0a | |||
4c287ca9b8 | |||
912bc1a1e4 | |||
e122c4c5fa |
@ -1,9 +1,9 @@
|
||||
name: Java16-Maven-Build
|
||||
name: Java17-Maven-Build
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build-java-16:
|
||||
build-java-17:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@ -12,10 +12,10 @@ jobs:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
# Java 16 Builds
|
||||
- name: Set up JDK 16
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v2.3.0
|
||||
with:
|
||||
java-version: 16
|
||||
java-version: 17
|
||||
distribution: 'adopt'
|
||||
- name: Build with Maven
|
||||
run: mvn -B package --file pom.xml
|
@ -11,20 +11,23 @@ These versions are currently actively supported by our team, and you should expe
|
||||
|
||||
| Version | Supported | Support End: |
|
||||
| ------------------- | ------------------ | ------------------------------ |
|
||||
| 2021.05 | :white_check_mark: | No Earlier than August 2021 |
|
||||
| 2021.09 | :white_check_mark: | No Earlier than December 2021 |
|
||||
|
||||
### Legacy Supported
|
||||
These versions are no longer under active development, however we will look to release critical secuirty patches where appropriate.
|
||||
|
||||
| Version | Supported | Support End: |
|
||||
| ------------------- | ------------------ | ------------ |
|
||||
| 2021.04 | :white_check_mark: | July 2021 |
|
||||
| 2021.06 | :white_check_mark: | October 2021 |
|
||||
|
||||
|
||||
### No Longer Supported
|
||||
These versions are no longer supported at all. It is strongly advised to update if you are running any of these versions.
|
||||
|
||||
| Version | Supported | Support Ended: |
|
||||
| ------------------- | ------------------ | ------------------- |
|
||||
| 2021.05 | :white_check_mark: | September 2021 |
|
||||
| 2021.04 | :white_check_mark: | July 2021 |
|
||||
| 2021.02 | :x: | 6 June 2021 |
|
||||
| 2020.11 | :x: | 3 May 2021 |
|
||||
| 6.0.x (Pre-Release) | :x: | December 2020 |
|
||||
|
2
pom.xml
2
pom.xml
@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>me.totalfreedom</groupId>
|
||||
<artifactId>TotalFreedomMod</artifactId>
|
||||
<version>2021.06</version>
|
||||
<version>2021.09</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
|
@ -276,18 +276,14 @@ public class CoreProtectBridge extends FreedomService
|
||||
Block block = event.getClickedBlock();
|
||||
final CoreProtectAPI coreProtect = getCoreProtectAPI();
|
||||
|
||||
// TODO: Rewrite this
|
||||
if (data.hasInspection())
|
||||
{
|
||||
if (event.getAction() == Action.LEFT_CLICK_BLOCK)
|
||||
{
|
||||
if (block != null)
|
||||
{
|
||||
event.setCancelled(true);
|
||||
List<String[]> lookup = coreProtect.blockLookup(block, -1);
|
||||
|
||||
int cooldownTime = 3;
|
||||
|
||||
if (cooldown.containsKey(player.getName()))
|
||||
// Cooldown check
|
||||
if ((event.getAction() == Action.LEFT_CLICK_BLOCK || event.getAction() == Action.RIGHT_CLICK_BLOCK)
|
||||
&& cooldown.containsKey(player.getName()))
|
||||
{
|
||||
long secondsLeft = getSecondsLeft(cooldown.get(player.getName()), cooldownTime);
|
||||
if (secondsLeft > 0L)
|
||||
@ -298,6 +294,14 @@ public class CoreProtectBridge extends FreedomService
|
||||
}
|
||||
}
|
||||
|
||||
// Actual lookup time
|
||||
if (event.getAction() == Action.LEFT_CLICK_BLOCK)
|
||||
{
|
||||
if (block != null)
|
||||
{
|
||||
event.setCancelled(true);
|
||||
List<String[]> lookup = coreProtect.blockLookup(block, -1);
|
||||
|
||||
if (!plugin.al.isAdmin(player))
|
||||
{
|
||||
cooldown.put(player.getName(), System.currentTimeMillis());
|
||||
@ -363,8 +367,6 @@ public class CoreProtectBridge extends FreedomService
|
||||
else if (event.getAction() == Action.RIGHT_CLICK_BLOCK)
|
||||
{
|
||||
if (block != null)
|
||||
{
|
||||
if (data.hasInspection())
|
||||
{
|
||||
BlockState blockState = block.getRelative(event.getBlockFace()).getState();
|
||||
Block placedBlock = blockState.getBlock();
|
||||
@ -376,19 +378,6 @@ public class CoreProtectBridge extends FreedomService
|
||||
lookup = coreProtect.blockLookup(block, -1);
|
||||
}
|
||||
|
||||
int cooldownTime = 3;
|
||||
|
||||
if (cooldown.containsKey(player.getName()))
|
||||
{
|
||||
long secondsLeft = getSecondsLeft(cooldown.get(player.getName()), cooldownTime);
|
||||
if (secondsLeft > 0L)
|
||||
{
|
||||
event.setCancelled(true);
|
||||
player.sendMessage(ChatColor.RED + String.valueOf(secondsLeft) + " seconds left before next query.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!plugin.al.isAdmin(player))
|
||||
{
|
||||
cooldown.put(player.getName(), System.currentTimeMillis());
|
||||
@ -453,5 +442,4 @@ public class CoreProtectBridge extends FreedomService
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
package me.totalfreedom.totalfreedommod.command;
|
||||
|
||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@CommandPermissions(level = Rank.NON_OP, source = SourceType.ONLY_IN_GAME)
|
||||
@CommandParameters(description = "Go to the Floatlands (not to be confused with the Flatlands).", usage = "/<command>", aliases = "void")
|
||||
public class Command_floatlands extends FreedomCommand
|
||||
{
|
||||
@Override
|
||||
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||
{
|
||||
plugin.wm.floatlands.sendToWorld(playerSender);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@ -40,11 +40,6 @@ public class CleanroomChunkGenerator extends ChunkGenerator
|
||||
}
|
||||
|
||||
public CleanroomChunkGenerator(String id)
|
||||
{
|
||||
this(id, true);
|
||||
}
|
||||
|
||||
public CleanroomChunkGenerator(String id, boolean generateBedrock)
|
||||
{
|
||||
if (id != null)
|
||||
{
|
||||
@ -53,11 +48,7 @@ public class CleanroomChunkGenerator extends ChunkGenerator
|
||||
int y = 0;
|
||||
|
||||
materials = new Material[128]; // Default to 128, will be resized later if required
|
||||
|
||||
if (generateBedrock)
|
||||
{
|
||||
materials[y++] = Material.BEDROCK;
|
||||
}
|
||||
|
||||
if (id.length() > 0)
|
||||
{
|
||||
@ -124,24 +115,14 @@ public class CleanroomChunkGenerator extends ChunkGenerator
|
||||
e.printStackTrace();
|
||||
|
||||
materials = new Material[65];
|
||||
|
||||
if (generateBedrock)
|
||||
{
|
||||
materials[0] = Material.BEDROCK;
|
||||
}
|
||||
|
||||
Arrays.fill(materials, 1, 65, Material.STONE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
materials = new Material[65];
|
||||
|
||||
if (generateBedrock)
|
||||
{
|
||||
materials[0] = Material.BEDROCK;
|
||||
}
|
||||
|
||||
Arrays.fill(materials, 1, 65, Material.STONE);
|
||||
}
|
||||
}
|
||||
|
@ -1,33 +0,0 @@
|
||||
package me.totalfreedom.totalfreedommod.world;
|
||||
|
||||
import org.bukkit.*;
|
||||
|
||||
public class Floatlands extends CustomWorld
|
||||
{
|
||||
|
||||
public Floatlands()
|
||||
{
|
||||
super("floatlands");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected World generateWorld()
|
||||
{
|
||||
final WorldCreator worldCreator = new WorldCreator(getName());
|
||||
worldCreator.generateStructures(false);
|
||||
worldCreator.type(WorldType.NORMAL);
|
||||
worldCreator.environment(World.Environment.NORMAL);
|
||||
worldCreator.generator(new CleanroomChunkGenerator("", false));
|
||||
|
||||
final World world = Bukkit.getServer().createWorld(worldCreator);
|
||||
|
||||
assert world != null;
|
||||
world.setSpawnFlags(false, false);
|
||||
world.setSpawnLocation(0, 50, 0);
|
||||
|
||||
plugin.gr.commitGameRules();
|
||||
|
||||
return world;
|
||||
}
|
||||
|
||||
}
|
@ -20,14 +20,12 @@ public class WorldManager extends FreedomService
|
||||
public Flatlands flatlands;
|
||||
public AdminWorld adminworld;
|
||||
public MasterBuilderWorld masterBuilderWorld;
|
||||
public Floatlands floatlands;
|
||||
|
||||
public WorldManager()
|
||||
{
|
||||
this.flatlands = new Flatlands();
|
||||
this.adminworld = new AdminWorld();
|
||||
this.masterBuilderWorld = new MasterBuilderWorld();
|
||||
this.floatlands = new Floatlands();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -36,7 +34,6 @@ public class WorldManager extends FreedomService
|
||||
flatlands.getWorld();
|
||||
adminworld.getWorld();
|
||||
masterBuilderWorld.getWorld();
|
||||
floatlands.getWorld();
|
||||
|
||||
// Disable weather
|
||||
if (ConfigEntry.DISABLE_WEATHER.getBoolean())
|
||||
|
Reference in New Issue
Block a user