-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: name block, UI.UIWindowStandard, feat: added new commands
- Исправлено создание блока без имени - Добавлены команды которые отображают список кастумных блоков\предметов - Улучшена заглушка на интерфейсы - Удалены не которых debug, warning сообщения
- Loading branch information
Showing
12 changed files
with
723 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/main/java/com/reider745/commands/CustomBlocksCommands.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.reider745.commands; | ||
|
||
import cn.nukkit.command.Command; | ||
import cn.nukkit.command.CommandSender; | ||
import com.reider745.api.CustomManager; | ||
import com.reider745.block.CustomBlock; | ||
import com.reider745.item.CustomItem; | ||
import com.reider745.item.ItemMethod; | ||
|
||
public class CustomBlocksCommands extends Command { | ||
public CustomBlocksCommands() { | ||
super("mods", "get list custom blocks"); | ||
} | ||
|
||
@Override | ||
public boolean execute(CommandSender commandSender, String s, String[] strings) { | ||
if(!commandSender.isOp()) return false; | ||
|
||
String message = "===CustomBlocks==="; | ||
for(Integer id : CustomBlock.blocks.keySet()) { | ||
CustomManager manager = CustomItem.getItemManager(id); | ||
message += "\n"+manager.get(ItemMethod.PropertiesNames.NAME)+", id: "+id; | ||
} | ||
commandSender.sendMessage(message); | ||
return true; | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
src/main/java/com/reider745/commands/CustomItemsCommands.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.reider745.commands; | ||
|
||
import cn.nukkit.command.Command; | ||
import cn.nukkit.command.CommandSender; | ||
import com.reider745.api.CustomManager; | ||
import com.reider745.item.CustomItem; | ||
import com.reider745.item.ItemMethod; | ||
|
||
|
||
public class CustomItemsCommands extends Command { | ||
public CustomItemsCommands() { | ||
super("mods", "get list custom items"); | ||
} | ||
|
||
@Override | ||
public boolean execute(CommandSender commandSender, String s, String[] strings) { | ||
if(!commandSender.isOp()) return false; | ||
|
||
String message = "===CustomItems==="; | ||
for(Integer id : CustomItem.items.keySet()) { | ||
CustomManager manager = CustomItem.getItemManager(id); | ||
message += "\n"+manager.get(ItemMethod.PropertiesNames.NAME)+", id: "+id; | ||
} | ||
commandSender.sendMessage(message); | ||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.