Skip to content

Commit

Permalink
v1.8.2 尝试修复观战
Browse files Browse the repository at this point in the history
  • Loading branch information
Sobadfish committed Sep 6, 2022
1 parent 354ee06 commit 04331ba
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package org.sobadfish.bedwar.manager;


import org.sobadfish.bedwar.room.GameRoom;
import org.sobadfish.bedwar.room.config.GameRoomEventConfig;
import org.sobadfish.bedwar.room.event.IGameRoomEvent;


import java.lang.reflect.InvocationTargetException;
import java.util.LinkedHashMap;

Expand All @@ -18,8 +16,6 @@ public static void register(String name,Class<? extends IGameRoomEvent> event){
}




public static IGameRoomEvent getEventByType(GameRoomEventConfig.GameRoomEventItem item){
if(EVENT.containsKey(item.eventType)){
Class<? extends IGameRoomEvent> e = EVENT.get(item.eventType);
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/org/sobadfish/bedwar/manager/RoomManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import org.sobadfish.bedwar.item.nbt.INbtItem;
import org.sobadfish.bedwar.panel.ChestInventoryPanel;
import org.sobadfish.bedwar.panel.DisPlayWindowsFrom;
import org.sobadfish.bedwar.panel.DisPlayerPanel;
import org.sobadfish.bedwar.panel.from.BedWarFrom;
import org.sobadfish.bedwar.panel.from.ShopFrom;
import org.sobadfish.bedwar.panel.from.button.BaseIButtom;
Expand Down Expand Up @@ -1105,10 +1106,10 @@ public void onClick(Player player) {

private void disPlayUI(PlayerInfo info,GameRoom room){
//WIN10 玩家 故障,,,,
// DisPlayerPanel playerPanel = new DisPlayerPanel();
// playerPanel.displayPlayer(info,DisPlayerPanel.displayPlayers(room),"传送玩家");
DisPlayerPanel playerPanel = new DisPlayerPanel();
playerPanel.displayPlayer(info,DisPlayerPanel.displayPlayers(room),"传送玩家");

disPlayProtect(info, room);
// disPlayProtect(info, room);
}

private boolean quitRoomItem(Player player, String roomName, GameRoom room) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package org.sobadfish.bedwar.panel.items;

import cn.nukkit.Player;
import cn.nukkit.block.Block;
import cn.nukkit.form.element.ElementButton;
import cn.nukkit.form.element.ElementButtonImageData;
import cn.nukkit.item.Item;
import cn.nukkit.nbt.tag.CompoundTag;
import cn.nukkit.utils.TextFormat;
import org.sobadfish.bedwar.item.ItemIDSunName;
import org.sobadfish.bedwar.panel.ChestInventoryPanel;
Expand All @@ -31,8 +29,8 @@ public int getCount() {

@Override
public Item getItem() {

return null;
Item item = new Item(397,3);
return item;
}

@Override
Expand All @@ -47,7 +45,7 @@ public void onClickButton(Player player, ShopFrom shopFrom) {

@Override
public Item getPanelItem(PlayerInfo i, int index) {
Item item = new Item(397,3);
Item item = getItem().clone();
item.setCustomName(TextFormat.colorize('&',"&r"+info.toString()));
//todo 这里似乎可以画个lore
List<String> lore = new ArrayList<>();
Expand Down
9 changes: 4 additions & 5 deletions src/main/java/org/sobadfish/bedwar/player/PlayerInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ public void sendActionBar(String msg){
return;
}
if(getPlayer() instanceof Player) {
((Player) getPlayer()).sendActionBar(msg);
((Player) getPlayer()).sendActionBar(TextFormat.colorize('&',msg));
}
}

Expand Down Expand Up @@ -587,10 +587,9 @@ private ArrayList<String> getLore(boolean isWait){
}
}
lore.add(" ");
lore.add("击杀数: &a"+killCount);
lore.add("最终击杀数: &a"+endKillCount);
lore.add("助攻数: &a"+assists);
lore.add("破坏床数: &a"+bedBreakCount);
lore.add("&b击杀数: &a"+killCount);
lore.add("&e助攻数: &a"+assists);
lore.add("&d破坏床数: &a"+bedBreakCount);

lore.add(" ");
}
Expand Down

0 comments on commit 04331ba

Please sign in to comment.