fix
This commit is contained in:
parent
5c88e81278
commit
64efbb5a59
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,3 +2,4 @@
|
||||||
/.idea/
|
/.idea/
|
||||||
/out/
|
/out/
|
||||||
/EnderDragonWars.iml
|
/EnderDragonWars.iml
|
||||||
|
/lib/
|
||||||
|
|
|
@ -25,7 +25,7 @@ public class AddMaxHealthEffect extends GiftEffect {
|
||||||
private int count = 0;
|
private int count = 0;
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (count >= 10) {
|
if (count >= 50) {
|
||||||
cancel();
|
cancel();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@ public class PlayerBigEffect extends GiftEffect {
|
||||||
}
|
}
|
||||||
player.getAttribute(Attribute.GENERIC_SCALE).setBaseValue(player.getAttribute(Attribute.GENERIC_SCALE).getBaseValue() + 0.5);
|
player.getAttribute(Attribute.GENERIC_SCALE).setBaseValue(player.getAttribute(Attribute.GENERIC_SCALE).getBaseValue() + 0.5);
|
||||||
player.getAttribute(Attribute.PLAYER_BLOCK_INTERACTION_RANGE).setBaseValue(player.getAttribute(Attribute.PLAYER_BLOCK_INTERACTION_RANGE).getBaseValue() + 1);
|
player.getAttribute(Attribute.PLAYER_BLOCK_INTERACTION_RANGE).setBaseValue(player.getAttribute(Attribute.PLAYER_BLOCK_INTERACTION_RANGE).getBaseValue() + 1);
|
||||||
|
player.getAttribute(Attribute.GENERIC_STEP_HEIGHT).setBaseValue(player.getAttribute(Attribute.GENERIC_STEP_HEIGHT).getBaseValue() + 1);
|
||||||
|
player.getAttribute(Attribute.GENERIC_MOVEMENT_SPEED).setBaseValue(player.getAttribute(Attribute.GENERIC_MOVEMENT_SPEED).getBaseValue() + 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@ public class PlayerResetEffect extends GiftEffect {
|
||||||
Player player = game.getPlayer();
|
Player player = game.getPlayer();
|
||||||
player.getAttribute(Attribute.GENERIC_SCALE).setBaseValue(1);
|
player.getAttribute(Attribute.GENERIC_SCALE).setBaseValue(1);
|
||||||
player.getAttribute(Attribute.PLAYER_BLOCK_INTERACTION_RANGE).setBaseValue(4.5);
|
player.getAttribute(Attribute.PLAYER_BLOCK_INTERACTION_RANGE).setBaseValue(4.5);
|
||||||
|
player.getAttribute(Attribute.GENERIC_STEP_HEIGHT).setBaseValue(0.6);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@ public class PlayerSmallEffect extends GiftEffect {
|
||||||
}
|
}
|
||||||
player.getAttribute(Attribute.GENERIC_SCALE).setBaseValue(player.getAttribute(Attribute.GENERIC_SCALE).getBaseValue() - 0.5);
|
player.getAttribute(Attribute.GENERIC_SCALE).setBaseValue(player.getAttribute(Attribute.GENERIC_SCALE).getBaseValue() - 0.5);
|
||||||
player.getAttribute(Attribute.PLAYER_BLOCK_INTERACTION_RANGE).setBaseValue(player.getAttribute(Attribute.PLAYER_BLOCK_INTERACTION_RANGE).getBaseValue() - 0.5);
|
player.getAttribute(Attribute.PLAYER_BLOCK_INTERACTION_RANGE).setBaseValue(player.getAttribute(Attribute.PLAYER_BLOCK_INTERACTION_RANGE).getBaseValue() - 0.5);
|
||||||
|
player.getAttribute(Attribute.GENERIC_STEP_HEIGHT).setBaseValue(player.getAttribute(Attribute.GENERIC_STEP_HEIGHT).getBaseValue() - 1);
|
||||||
|
player.getAttribute(Attribute.GENERIC_MOVEMENT_SPEED).setBaseValue(player.getAttribute(Attribute.GENERIC_MOVEMENT_SPEED).getBaseValue() - 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ public class TakeMaxHealthEffect extends GiftEffect {
|
||||||
if (player.getAttribute(Attribute.GENERIC_MAX_HEALTH).getBaseValue() <= 20) {
|
if (player.getAttribute(Attribute.GENERIC_MAX_HEALTH).getBaseValue() <= 20) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
player.getAttribute(Attribute.GENERIC_MAX_HEALTH).setBaseValue(player.getAttribute(Attribute.GENERIC_MAX_HEALTH).getBaseValue() - 20);
|
player.getAttribute(Attribute.GENERIC_MAX_HEALTH).setBaseValue(20);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,8 @@ import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
|
|
||||||
public class LikeListener implements Listener {
|
public class LikeListener implements Listener {
|
||||||
@EventHandler//点赞
|
|
||||||
|
@EventHandler
|
||||||
public void onDianZan(LiveLikeEvents e) {
|
public void onDianZan(LiveLikeEvents e) {
|
||||||
Player zhubo = e.getPlayer();
|
Player zhubo = e.getPlayer();
|
||||||
String userName = "" + RandomUtil.getRandomInt(999, 10000);
|
String userName = "" + RandomUtil.getRandomInt(999, 10000);
|
||||||
|
@ -29,4 +30,5 @@ public class LikeListener implements Listener {
|
||||||
gameManager.setDianzan_amount(0);
|
gameManager.setDianzan_amount(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,7 @@ package com.yaohun.enderdragonwars.manager;
|
||||||
|
|
||||||
import com.yaohun.enderdragonwars.effect.GiftEffect;
|
import com.yaohun.enderdragonwars.effect.GiftEffect;
|
||||||
import com.yaohun.enderdragonwars.effect.GiftQueue;
|
import com.yaohun.enderdragonwars.effect.GiftQueue;
|
||||||
import com.yaohun.enderdragonwars.effect.types.BomBomEffect;
|
import com.yaohun.enderdragonwars.effect.types.*;
|
||||||
import com.yaohun.enderdragonwars.effect.types.ClearInventoryEffect;
|
|
||||||
import org.bukkit.scheduler.BukkitTask;
|
import org.bukkit.scheduler.BukkitTask;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -43,6 +42,20 @@ public class GiftEffectManager {
|
||||||
public static void registerAll() {
|
public static void registerAll() {
|
||||||
registerGiftEffect("清理背包", ClearInventoryEffect::new);
|
registerGiftEffect("清理背包", ClearInventoryEffect::new);
|
||||||
registerGiftEffect("火山喷发", BomBomEffect::new);
|
registerGiftEffect("火山喷发", BomBomEffect::new);
|
||||||
|
registerGiftEffect("幸运方块", LuckyBlockEffect::new);
|
||||||
|
registerGiftEffect("黑洞", BlackHoleEffect::new);
|
||||||
|
registerGiftEffect("五雷轰顶", FiveLightningEffect::new);
|
||||||
|
registerGiftEffect("装备清空", ClearInventoryEffect::new);
|
||||||
|
registerGiftEffect("岩浆泡澡", LavaPoolEffect::new);
|
||||||
|
registerGiftEffect("钢铁保安", SummonIronGolem::new);
|
||||||
|
registerGiftEffect("6倍血量", AddMaxHealthEffect::new);
|
||||||
|
registerGiftEffect("原地复活", GiveTotemEffect::new);
|
||||||
|
registerGiftEffect("魔豆天梯", SpawnEnderPortalEffect::new);
|
||||||
|
registerGiftEffect("世界毁灭", WorldDestroyEffect::new);
|
||||||
|
registerGiftEffect("变大", PlayerBigEffect::new);
|
||||||
|
registerGiftEffect("变小", PlayerSmallEffect::new);
|
||||||
|
registerGiftEffect("安全庇护所", SpawnBuildEffect::new);
|
||||||
|
registerGiftEffect("螺旋升天", ToHeavenEffect::new);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void registerGiftEffect(String id, Function<String, GiftEffect> giftEffectGetter) {
|
private static void registerGiftEffect(String id, Function<String, GiftEffect> giftEffectGetter) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user