mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2025-02-27 09:42:45 +01:00
Some patches
This commit is contained in:
parent
0b4ae116da
commit
516720bd24
@ -43,6 +43,7 @@ # Patches
|
||||
| server | Cows eat mushrooms | William Blake Galbreath | |
|
||||
| api | Default permissions | William Blake Galbreath | |
|
||||
| server | Despawn rate config options per projectile type | jmp | |
|
||||
| api | Disable reload command | Ivan Pekov | |
|
||||
| server | Disable the Snooper | Sotr | |
|
||||
| server | Don't load chunk with seed based feature search | Phoenix616 | |
|
||||
| server | Don't trigger Lootable Refresh for non player interaction | Aikar | |
|
||||
@ -86,6 +87,7 @@ # Patches
|
||||
| server | Option to toggle milk curing bad omen | William Blake Galbreath | |
|
||||
| server | Origami Server Config | Phoenix616 | |
|
||||
| server | PaperPR - Add hex color code support for console logging | Esophose | |
|
||||
| server | PaperPR: Fix harming potion dupe | PepperCode1 | |
|
||||
| server | Per entity (type) collision settings | MrIvanPlays | tr7zw |
|
||||
| server | Persistent TileEntity Lore and DisplayName | jmp | |
|
||||
| api | PlayerAttackEntityEvent | Ivan Pekov | |
|
||||
|
30
patches/api/0010-Disable-reload-command.patch
Normal file
30
patches/api/0010-Disable-reload-command.patch
Normal file
@ -0,0 +1,30 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Ivan Pekov <ivan@mrivanplays.com>
|
||||
Date: Mon, 19 Oct 2020 15:48:06 +0300
|
||||
Subject: [PATCH] Disable reload command
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
|
||||
index 0c7ba0718de2b93d013968ca0fec34ffd423990f..3a726fd145e5bbb1513b74eaae7d768ae6ab4a9f 100644
|
||||
--- a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
|
||||
+++ b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
|
||||
@@ -21,6 +21,19 @@ public class ReloadCommand extends BukkitCommand {
|
||||
@Override
|
||||
public boolean execute(@NotNull CommandSender sender, @NotNull String currentAlias, @NotNull String[] args) { // Paper
|
||||
if (!testPermission(sender)) return true;
|
||||
+ // Yatopia start - fix lag
|
||||
+ if (Boolean.parseBoolean(System.getProperty("Yatopia.DisableReloadCommand", "true"))) {
|
||||
+ sender.sendMessage(ChatColor.RED + "Operation denied.");
|
||||
+ sender.sendMessage(ChatColor.RED + "Reload command SHOULD NEVER EVER EVER be used in whatever circumstances.");
|
||||
+ sender.sendMessage(ChatColor.RED + "YatopiaMC team has intentionally disabled it in order to stop you using it, instead of restarting your server.");
|
||||
+ sender.sendMessage(ChatColor.RED + "---------------------------------------------");
|
||||
+ sender.sendMessage(ChatColor.RED + "RESTART YOUR SERVER AND NEVER USE /reload");
|
||||
+ sender.sendMessage(ChatColor.YELLOW + "For plugin developers: learn what a HOTSWAP AGENT is and stop using /reload");
|
||||
+ sender.sendMessage(ChatColor.RED + "---------------------------------------------");
|
||||
+ sender.sendMessage(ChatColor.YELLOW + "For more information, join our discord server.");
|
||||
+ return true;
|
||||
+ }
|
||||
+ // Yatopia end
|
||||
|
||||
// Paper start - Reload permissions.yml & require confirm
|
||||
boolean confirmed = System.getProperty("LetMeReload") != null;
|
50
patches/server/0065-PaperPR-Fix-harming-potion-dupe.patch
Normal file
50
patches/server/0065-PaperPR-Fix-harming-potion-dupe.patch
Normal file
@ -0,0 +1,50 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PepperCode1 <44146161+PepperCode1@users.noreply.github.com>
|
||||
Date: Mon, 19 Oct 2020 15:56:47 +0300
|
||||
Subject: [PATCH] PaperPR: Fix harming potion dupe
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemPotion.java b/src/main/java/net/minecraft/server/ItemPotion.java
|
||||
index 7862b63a245222d9a3d0896bdb2741b0e5e7ac40..105665d6688e860a30fe52980419818ee8ef5a2c 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemPotion.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemPotion.java
|
||||
@@ -22,6 +22,8 @@ public class ItemPotion extends Item {
|
||||
CriterionTriggers.z.a((EntityPlayer) entityhuman, itemstack);
|
||||
}
|
||||
|
||||
+ List<MobEffect> instantLater = new net.yatopia.server.list.GlueList<>(); // Yatopia
|
||||
+
|
||||
if (!world.isClientSide) {
|
||||
List<MobEffect> list = PotionUtil.getEffects(itemstack);
|
||||
Iterator iterator = list.iterator();
|
||||
@@ -30,7 +32,7 @@ public class ItemPotion extends Item {
|
||||
MobEffect mobeffect = (MobEffect) iterator.next();
|
||||
|
||||
if (mobeffect.getMobEffect().isInstant()) {
|
||||
- mobeffect.getMobEffect().applyInstantEffect(entityhuman, entityhuman, entityliving, mobeffect.getAmplifier(), 1.0D);
|
||||
+ instantLater.add(mobeffect); // Yatopia
|
||||
} else {
|
||||
entityliving.addEffect(new MobEffect(mobeffect), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.POTION_DRINK); // CraftBukkit
|
||||
}
|
||||
@@ -44,7 +46,21 @@ public class ItemPotion extends Item {
|
||||
}
|
||||
}
|
||||
|
||||
+ // Yatopia start - fix harming potion dupe
|
||||
+ if (!world.isClientSide) {
|
||||
+ for (MobEffect mobeffect : instantLater) {
|
||||
+ mobeffect.getMobEffect().applyInstantEffect(entityhuman, entityhuman, entityliving, mobeffect.getAmplifier(), 1.0D);
|
||||
+ }
|
||||
+ }
|
||||
+ // Yatopia end
|
||||
+
|
||||
if (entityhuman == null || !entityhuman.abilities.canInstantlyBuild) {
|
||||
+ // Yatopia start - fix harming potion dupe
|
||||
+ if (entityliving.getHealth() <= 0 && !(entityhuman != null && entityliving.world.getGameRules().getBoolean(GameRules.KEEP_INVENTORY))) {
|
||||
+ entityliving.dropItem(new ItemStack(Items.GLASS_BOTTLE), 0);
|
||||
+ return ItemStack.NULL_ITEM;
|
||||
+ }
|
||||
+ // Yatopia end
|
||||
if (itemstack.isEmpty()) {
|
||||
return new ItemStack(Items.GLASS_BOTTLE);
|
||||
}
|
Loading…
Reference in New Issue
Block a user