Skip to content

Commit 146f426

Browse files
Merge pull request #11 from ParallelMC/1.19
1.19 Update
2 parents 1a91c53 + 91ec4b9 commit 146f426

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2350
-52
lines changed

build.gradle

Lines changed: 44 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
plugins {
22
id 'java'
33
id 'com.github.johnrengelman.shadow' version '7.1.2'
4-
id("io.papermc.paperweight.userdev") version "1.3.3"
4+
id("io.papermc.paperweight.userdev") version "1.3.7"
55
id("xyz.jpenilla.run-paper") version "1.0.6" // Adds runServer and runMojangMappedServer tasks for testing
6-
id 'net.minecrell.plugin-yml.bukkit' version '0.5.1'
6+
id 'net.minecrell.plugin-yml.bukkit' version '0.5.2'
77
}
88

99
group = 'org.parallelmc'
1010

11-
version = '2.4.0'
11+
version = '2.5.0'
1212
description = 'A set of utilities and features for use on the Parallel Minecraft server'
1313

1414
java {
@@ -29,22 +29,23 @@ repositories {
2929
maven { url = 'https://repo.extendedclip.com/content/repositories/placeholderapi/' }
3030
maven { url = 'https://repo.dmulloy2.net/repository/public/' }
3131
maven { url = 'https://repo.codemc.org/repository/maven-public/' }
32+
maven { url = 'https://repo.rosewooddev.io/repository/public/' }
3233
}
3334

3435
dependencies {
35-
paperweightDevelopmentBundle("io.papermc.paper:dev-bundle:1.18.2-R0.1-SNAPSHOT")
36+
paperweightDevelopmentBundle("io.papermc.paper:dev-bundle:1.19-R0.1-SNAPSHOT")
3637

37-
compileOnly "io.papermc.paper:paper-api:1.18.2-R0.1-SNAPSHOT"
38-
implementation 'org.jetbrains:annotations:16.0.1'
39-
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
38+
compileOnly "io.papermc.paper:paper-api:1.19-R0.1-SNAPSHOT"
39+
implementation 'org.jetbrains:annotations:23.0.0'
40+
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
4041
implementation 'net.dv8tion:JDA:4.4.0_350'
41-
compileOnly 'me.clip:placeholderapi:2.10.10'
42+
compileOnly 'me.clip:placeholderapi:2.11.2'
4243
compileOnly fileTree('libs') { include '*.jar' }
43-
compileOnly 'com.sk89q.worldguard:worldguard-bukkit:7.0.6'
44-
implementation 'mysql:mysql-connector-java:8.0.26'
45-
compileOnly 'net.luckperms:api:5.3'
46-
compileOnly 'com.comphenix.protocol:ProtocolLib:4.7.0'
47-
compileOnly 'dev.esophose:playerparticles:7.25'
44+
compileOnly 'com.sk89q.worldguard:worldguard-bukkit:7.0.7'
45+
implementation 'mysql:mysql-connector-java:8.0.29'
46+
compileOnly 'net.luckperms:api:5.4'
47+
compileOnly 'com.comphenix.protocol:ProtocolLib:4.8.0'
48+
compileOnly 'dev.esophose:playerparticles:8.2'
4849
}
4950

5051
artifacts {
@@ -81,7 +82,7 @@ bukkit {
8182

8283
main = 'parallelmc.parallelutils.Parallelutils'
8384

84-
apiVersion = '1.18'
85+
apiVersion = '1.19'
8586

8687
depend = ['PlaceholderAPI', 'ProtocolLib']
8788
softDepend = ['Multiverse-Core', 'FractalForest', 'WorldGuard', 'VoteParty', 'PlayerParticles', 'ProNouns']
@@ -93,6 +94,12 @@ bukkit {
9394
permissionMessage = 'You do not have permission'
9495
aliases = ['pu',]
9596
}
97+
chatroom {
98+
description = 'Base command for all ChatRoom commands'
99+
usage = '/cr'
100+
permissionMessage = 'You do not have permission'
101+
aliases = ['cr',]
102+
}
96103
depositexp {
97104
description = 'Deposit exp into the player\' s ender chest '
98105
usage = '/depositexp <amount | all>'
@@ -176,6 +183,12 @@ bukkit {
176183
permissionMessage = 'You do not have permission'
177184
permission = 'parallelutils.commandspy'
178185
}
186+
chatroomspy {
187+
description = 'Toggles chatroom spy'
188+
usage = '/chatroomspy'
189+
permissionMessage = 'You do not have permission'
190+
permission = 'parallelutils.chatrooms.chatroomspy'
191+
}
179192
mutechat {
180193
description = 'Mute or unmute the chat'
181194
usage = '/mutechat'
@@ -329,7 +342,7 @@ bukkit {
329342
}
330343
'parallelutils.bypass' {
331344
description = 'Bypasses some ParallelUtils modules'
332-
childrenMap = ['parallelutils.bypass.anticaps': true, 'parallelutils.bypass.antislur': true, 'parallelutils.bypass.clearchat': true, 'parallelutils.bypass.socialspy': true, 'parallelutils.bypass.commandspy': true, 'parallelutils.bypass.mutechat': true,]
345+
childrenMap = ['parallelutils.bypass.anticaps': true, 'parallelutils.bypass.antislur': true, 'parallelutils.bypass.clearchat': true, 'parallelutils.bypass.socialspy': true, 'parallelutils.bypass.commandspy': true, 'parallelutils.bypass.mutechat': true,'parallelutils.bypass.chestshops': true, 'parallelutils.bypass.chatroomspy': true]
333346
}
334347
'parallelutils.bypass.anticaps' {
335348
description = 'Bypasses the Anti-Caps module'
@@ -346,15 +359,31 @@ bukkit {
346359
'parallelutils.bypass.commandspy' {
347360
description = 'Bypasses the Command Spy module'
348361
}
362+
'parallelutils.bypass.chatroomspy' {
363+
description = 'Bypasses the ChatRoom Spy module'
364+
}
349365
'parallelutils.bypass.mutechat' {
350366
description = 'Bypasses chat being muted'
351367
}
368+
'parallelutils.bypass.chestshops' {
369+
description = 'Bypasses chest shop protection'
370+
}
352371
'parallelutils.notify' {
353372
description = 'Be notified by some ParallelUtils modules'
354373
childrenMap = ['parallelutils.notify.antislur': true,]
355374
}
356375
'parallelutils.notify.antislur' {
357376
description = 'Be notified of swearing'
358377
}
378+
'parallelutils.chestshops.create' {
379+
description = 'Allows creation of Chest Shops'
380+
}
381+
'parallelutils.chatrooms' {
382+
description = 'Chatroom admin permissions'
383+
childrenMap = ['parallelutils.chatrooms.chatroomspy': true,]
384+
}
385+
'parallelutils.chatrooms.chatroomspy' {
386+
description = 'View messages from all chatrooms'
387+
}
359388
}
360389
}

src/main/java/parallelmc/parallelutils/Constants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
public class Constants {
44

5-
public static final Version VERSION = new Version(2, 4, 0);
5+
public static final Version VERSION = new Version(2, 5, 0);
66
public static final String PLUGIN_NAME = "ParallelUtils";
77
public static final String DEFAULT_WORLD = "world2";
88
}

src/main/java/parallelmc/parallelutils/Parallelutils.java

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@
88
import parallelmc.parallelutils.commands.*;
99
import parallelmc.parallelutils.modules.charms.ParallelCharms;
1010
import parallelmc.parallelutils.modules.bitsandbobs.BitsAndBobs;
11+
import parallelmc.parallelutils.modules.chestshops.ChestShops;
1112
import parallelmc.parallelutils.modules.custommobs.CustomMobs;
1213
import parallelmc.parallelutils.modules.customtrees.ParallelTrees;
1314
import parallelmc.parallelutils.modules.discordintegration.DiscordIntegration;
1415
import parallelmc.parallelutils.modules.expstorage.ExpStorage;
1516
import parallelmc.parallelutils.modules.gamemode4.beehiveInspector.BeehiveInspector;
1617
import parallelmc.parallelutils.modules.parallelchat.ParallelChat;
18+
import parallelmc.parallelutils.modules.parallelchat.commands.chatrooms.*;
1719
import parallelmc.parallelutils.modules.parallelflags.ParallelFlags;
1820
import parallelmc.parallelutils.modules.parallelitems.ParallelItems;
1921
import parallelmc.parallelutils.modules.effectextender.EffectExtender;
@@ -47,6 +49,8 @@ public final class Parallelutils extends JavaPlugin {
4749
private HashMap<String, ParallelModule> registeredModules;
4850
private Commands commands;
4951

52+
private ChatroomCommands chatroomCommands;
53+
5054
@Override
5155
public void onLoad() {
5256
registeredModules = new HashMap<>();
@@ -151,17 +155,34 @@ public void onEnable() {
151155
}
152156

153157
commands = new Commands();
158+
chatroomCommands = new ChatroomCommands();
154159

155160
addCommand("help", new ParallelHelpCommand());
156161
addCommand("test", new ParallelTestCommand());
157162
addCommand("wait", new ParallelWaitCommand(this));
158163

164+
addChatRoomCommand("create", new ParallelCreateChatroom());
165+
addChatRoomCommand("leave", new ParallelLeaveChatroom());
166+
addChatRoomCommand("join", new ParallelJoinChatroom());
167+
addChatRoomCommand("promote", new ParallelPromoteMember());
168+
addChatRoomCommand("demote", new ParallelDemoteMember());
169+
addChatRoomCommand("members", new ParallelListMembers());
170+
addChatRoomCommand("kick", new ParallelKickMember());
171+
addChatRoomCommand("list", new ParallelListChatrooms());
172+
addChatRoomCommand("invite", new ParallelSendInvite());
173+
addChatRoomCommand("accept", new ParallelAcceptInvite());
174+
addChatRoomCommand("disband", new ParallelDisbandChatroom());
175+
addChatRoomCommand("help", new ParallelHelpChatrooms());
176+
addChatRoomCommand("msg", new ParallelMsgChatroom());
177+
159178
getCommand("parallelutils").setExecutor(commands);
160179
getCommand("parallelutils").setTabCompleter(commands);
161180
getCommand("pu").setExecutor(commands);
162181
getCommand("pu").setTabCompleter(commands);
163-
164-
182+
getCommand("chatroom").setExecutor(chatroomCommands);
183+
getCommand("chatroom").setTabCompleter(chatroomCommands);
184+
getCommand("cr").setExecutor(chatroomCommands);
185+
getCommand("cr").setTabCompleter(chatroomCommands);
165186

166187
// Setup modules
167188

@@ -270,6 +291,14 @@ public void onEnable() {
270291
e.printStackTrace();
271292
}
272293

294+
try {
295+
ChestShops chestShops = new ChestShops();
296+
chestShops.onEnable();
297+
} catch (Exception e) {
298+
Parallelutils.log(Level.SEVERE, "Error while enabling module ChestShops!");
299+
e.printStackTrace();
300+
}
301+
273302
// TODO: Make this not horrible
274303
try {
275304
ParallelModule flags = getModule("ParallelFlags");
@@ -423,6 +452,15 @@ public boolean addCommand(String name, ParallelCommand command) {
423452
return commands.addCommand(name, command);
424453
}
425454

455+
/**
456+
* Wrapper for {@code parallelmc.parallelutils.modules.parallelchat.commands.chatrooms.ChatroomCommand.addCommand}
457+
* Adds a new command to the commandmap
458+
* @param name The name of the command
459+
* @param command The command to be run when the name is called
460+
* @return Returns true when the command was added successfully, false if the command already exists.
461+
*/
462+
public boolean addChatRoomCommand(String name, ChatroomCommand command) { return chatroomCommands.addCommand(name, command); }
463+
426464
/**
427465
* Wrapper for {@code parallelmc.parallelutils.commands.Commands.getCommands}
428466
* @return A deep copy of the command map
@@ -431,6 +469,14 @@ public Map<String, ParallelCommand> getCommands() {
431469
return commands.getCommands();
432470
}
433471

472+
/**
473+
* Wrapper for {@code parallelmc.parallelutils.modules.parallelchat.commands.chatrooms.ChatroomCommands#getCommands()}
474+
* @return A deep copy of the command map
475+
*/
476+
public Map<String, ChatroomCommand> getChatroomCommands() {
477+
return chatroomCommands.getCommands();
478+
}
479+
434480
/**
435481
* A helper method to log a message at a specific log level with the prefix "[ParallelUtils] "
436482
* @param level The level to log the message at

src/main/java/parallelmc/parallelutils/commands/Commands.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import org.bukkit.World;
66
import org.bukkit.block.Block;
77
import org.bukkit.command.*;
8-
import org.bukkit.craftbukkit.v1_18_R2.command.ServerCommandSender;
8+
import org.bukkit.craftbukkit.v1_19_R1.command.ServerCommandSender;
99
import org.bukkit.entity.Player;
1010
import org.jetbrains.annotations.NotNull;
1111
import org.jetbrains.annotations.Nullable;
@@ -88,7 +88,7 @@ public List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Comman
8888

8989
String lowerName = command.getName().toLowerCase().strip();
9090

91-
if (lowerName.equals("parallelutils") || lowerName.equals("pu") && args.length == 1) {
91+
if ((lowerName.equals("parallelutils") || lowerName.equals("pu")) && args.length == 1) {
9292
// List every sub-command
9393
list.addAll(commandMap.keySet());
9494
} else {

src/main/java/parallelmc/parallelutils/modules/bitsandbobs/minimodules/KeepSpecialItems.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import net.minecraft.nbt.CompoundTag;
44
import org.bukkit.Material;
5-
import org.bukkit.craftbukkit.v1_18_R2.inventory.CraftItemStack;
5+
import org.bukkit.craftbukkit.v1_19_R1.inventory.CraftItemStack;
66
import org.bukkit.event.EventHandler;
77
import org.bukkit.event.EventPriority;
88
import org.bukkit.event.Listener;

src/main/java/parallelmc/parallelutils/modules/bitsandbobs/minimodules/SpecialItems.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import org.bukkit.Bukkit;
55
import org.bukkit.Material;
66
import org.bukkit.NamespacedKey;
7-
import org.bukkit.craftbukkit.v1_18_R2.inventory.CraftItemStack;
7+
import org.bukkit.craftbukkit.v1_19_R1.inventory.CraftItemStack;
88
import org.bukkit.event.EventHandler;
99
import org.bukkit.event.EventPriority;
1010
import org.bukkit.event.Listener;

src/main/java/parallelmc/parallelutils/modules/charms/handlers/impl/CharmParticleHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import org.bukkit.Material;
55
import org.bukkit.Particle;
66
import org.bukkit.block.data.BlockData;
7-
import org.bukkit.craftbukkit.v1_18_R2.block.data.CraftBlockData;
7+
import org.bukkit.craftbukkit.v1_19_R1.block.data.CraftBlockData;
88
import org.bukkit.entity.Player;
99
import org.bukkit.inventory.ItemStack;
1010
import org.bukkit.scheduler.BukkitRunnable;

src/main/java/parallelmc/parallelutils/modules/charms/handlers/impl/CharmPlayerParticleHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import dev.esophose.playerparticles.styles.ParticleStyle;
1111
import org.bukkit.Material;
1212
import org.bukkit.NamespacedKey;
13-
import org.bukkit.craftbukkit.v1_18_R2.inventory.CraftInventoryPlayer;
13+
import org.bukkit.craftbukkit.v1_19_R1.inventory.CraftInventoryPlayer;
1414
import org.bukkit.entity.Player;
1515
import org.bukkit.inventory.ItemStack;
1616
import org.bukkit.inventory.PlayerInventory;

src/main/java/parallelmc/parallelutils/modules/charms/listeners/PlayerJoinContainerListenerOverwrite.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import net.minecraft.world.inventory.*;
66
import net.minecraft.world.item.ItemStack;
77
import org.bukkit.Bukkit;
8-
import org.bukkit.craftbukkit.v1_18_R2.entity.CraftPlayer;
8+
import org.bukkit.craftbukkit.v1_19_R1.entity.CraftPlayer;
99
import org.bukkit.entity.Player;
1010
import org.bukkit.event.EventHandler;
1111
import org.bukkit.event.EventPriority;

0 commit comments

Comments
 (0)