mirror of
https://github.com/kaboomserver/extras.git
synced 2025-02-11 11:40:19 +00:00
Minor cleanups
This commit is contained in:
parent
93b968be5d
commit
f984ac411a
1 changed files with 547 additions and 533 deletions
|
@ -1,6 +1,6 @@
|
|||
package pw.kaboom.extras;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.UUID;
|
||||
|
@ -12,10 +12,19 @@ import com.destroystokyo.paper.profile.PlayerProfile;
|
|||
|
||||
public class Main extends JavaPlugin {
|
||||
int fallingBlockCount;
|
||||
HashMap<UUID, Long> commandMillisList = new HashMap<UUID, Long>();
|
||||
HashMap<UUID, Long> interactMillisList = new HashMap<UUID, Long>();
|
||||
HashMap<String, PlayerProfile> playerProfile = new HashMap<String, PlayerProfile>();
|
||||
HashSet<String> consoleCommandBlacklist = new HashSet<String>(Arrays.asList(new String[] {
|
||||
HashMap<UUID, Long> commandMillisList = new HashMap<>();
|
||||
HashMap<UUID, Long> interactMillisList = new HashMap<>();
|
||||
HashMap<String, PlayerProfile> playerProfile = new HashMap<>();
|
||||
HashSet<String> consoleCommandBlacklist = new HashSet<>();
|
||||
HashSet<Material> fallingBlockList = new HashSet<>();
|
||||
HashSet<Material> nonSolidBlockList = new HashSet<>();
|
||||
HashSet<Material> nonSolidDoubleBlockList = new HashSet<>();
|
||||
HashSet<Material> nonSolidSingularBlockList = new HashSet<>();
|
||||
HashSet<Material> nonSolidWallMountedBlockList = new HashSet<>();
|
||||
|
||||
public void onEnable() {
|
||||
Collections.addAll(
|
||||
consoleCommandBlacklist,
|
||||
"essentials:action",
|
||||
"essentials:adventure",
|
||||
"essentials:adventuremode",
|
||||
|
@ -339,14 +348,18 @@ public class Main extends JavaPlugin {
|
|||
"w",
|
||||
"warp",
|
||||
"warps",
|
||||
"whisper",
|
||||
}));
|
||||
HashSet<Material> fallingBlockList = new HashSet<Material>(Arrays.asList(new Material[] {
|
||||
"whisper"
|
||||
);
|
||||
|
||||
Collections.addAll(
|
||||
fallingBlockList,
|
||||
Material.ANVIL,
|
||||
Material.GRAVEL,
|
||||
Material.SAND,
|
||||
}));
|
||||
HashSet<Material> nonSolidDoubleBlockList = new HashSet<Material>(Arrays.asList(new Material[] {
|
||||
Material.SAND
|
||||
);
|
||||
|
||||
Collections.addAll(
|
||||
nonSolidDoubleBlockList,
|
||||
Material.GRASS,
|
||||
Material.SIGN,
|
||||
Material.OAK_DOOR,
|
||||
|
@ -399,9 +412,11 @@ public class Main extends JavaPlugin {
|
|||
Material.LARGE_FERN,
|
||||
Material.LILAC,
|
||||
Material.ROSE_BUSH,
|
||||
Material.PEONY,
|
||||
}));
|
||||
HashSet<Material> nonSolidSingularBlockList = new HashSet<Material>(Arrays.asList(new Material[] {
|
||||
Material.PEONY
|
||||
);
|
||||
|
||||
Collections.addAll(
|
||||
nonSolidSingularBlockList,
|
||||
Material.ACACIA_SAPLING,
|
||||
Material.BIRCH_SAPLING,
|
||||
Material.DARK_OAK_SAPLING,
|
||||
|
@ -475,9 +490,11 @@ public class Main extends JavaPlugin {
|
|||
Material.FIRE_CORAL,
|
||||
Material.HORN_CORAL,
|
||||
Material.TUBE_CORAL,
|
||||
Material.SEA_PICKLE,
|
||||
}));
|
||||
HashSet<Material> nonSolidWallMountedBlockList = new HashSet<Material>(Arrays.asList(new Material[] {
|
||||
Material.SEA_PICKLE
|
||||
);
|
||||
|
||||
Collections.addAll(
|
||||
nonSolidWallMountedBlockList,
|
||||
Material.TORCH,
|
||||
Material.WALL_TORCH,
|
||||
Material.LADDER,
|
||||
|
@ -540,12 +557,9 @@ public class Main extends JavaPlugin {
|
|||
Material.HORN_CORAL_FAN,
|
||||
Material.HORN_CORAL_WALL_FAN,
|
||||
Material.TUBE_CORAL_FAN,
|
||||
Material.TUBE_CORAL_WALL_FAN,
|
||||
}));
|
||||
Material.TUBE_CORAL_WALL_FAN
|
||||
);
|
||||
|
||||
HashSet<Material> nonSolidBlockList = new HashSet<Material>();
|
||||
|
||||
public void onEnable() {
|
||||
this.nonSolidBlockList.addAll(nonSolidDoubleBlockList);
|
||||
this.nonSolidBlockList.addAll(nonSolidSingularBlockList);
|
||||
this.nonSolidBlockList.addAll(nonSolidWallMountedBlockList);
|
||||
|
|
Loading…
Reference in a new issue