mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-11-25 20:15:58 +01:00
fix: remove references to old material + make translatable
This commit is contained in:
parent
10618e2ab0
commit
2cd64528a4
@ -21,9 +21,9 @@ public class EndGatewayBlockSubCommand implements SubCommand {
|
||||
sender.sendMessage(Lang.translate("messageprefix.negative") + Lang.translate("command.playeronly"));
|
||||
}
|
||||
else {
|
||||
player.giveWool("BLACK", "\u00A78Gateway Block Placer"
|
||||
, "\u00A7rThis wool is made of a magical substance",
|
||||
"\u00A7rRight Click: Place portal block");
|
||||
player.giveItem("BLACK_WOOL", "\u00A78Gateway Block Placer"
|
||||
, "\u00A7r\u00A77This wool is made of a magical substance",
|
||||
"\u00A7r\u00A7eRight Click\u00A77: Place portal block");
|
||||
sender.sendMessage(Lang.translate("messageprefix.positive") + Lang.translate("command.gatewayblock"));
|
||||
}
|
||||
|
||||
|
@ -21,9 +21,9 @@ public class EndPortalBlockSubCommand implements SubCommand {
|
||||
sender.sendMessage(Lang.translate("messageprefix.negative") + Lang.translate("command.playeronly"));
|
||||
}
|
||||
else {
|
||||
player.giveWool("BLACK", "\u00A78End Portal Block Placer"
|
||||
, "\u00A7rThis wool is made of a magical substance",
|
||||
"\u00A7rRight Click: Place portal block");
|
||||
player.giveItem("BLACK_WOOL", "\u00A78End Portal Block Placer"
|
||||
, "\u00A7r\u00A77This wool is made of a magical substance",
|
||||
"\u00A7r\u00A7eRight Click\u00A77: Place portal block");
|
||||
sender.sendMessage(Lang.translate("messageprefix.positive") + Lang.translate("command.endportalblock"));
|
||||
}
|
||||
|
||||
|
@ -22,10 +22,10 @@ public class PortalBlockSubCommand implements SubCommand {
|
||||
sender.sendMessage(Lang.translate("messageprefix.negative") + Lang.translate("command.playeronly"));
|
||||
}
|
||||
else {
|
||||
player.giveWool("PURPLE", "\u00A75Portal Block Placer"
|
||||
, "\u00A7rThis wool is made of a magical substance",
|
||||
"\u00A7rRight Click: Place portal block",
|
||||
"\u00A7rLeft Click: Rotate portal block");
|
||||
player.giveItem("PURPLE_WOOL", "\u00A75Portal Block Placer"
|
||||
, "\u00A7r\u00A77This wool is made of a magical substance",
|
||||
"\u00A7r\u00A7e" + Lang.translate("items.interact.left") + "\u00A77: Rotate portal block",
|
||||
"\u00A7r\u00A7e" + Lang.translate("items.interact.right") + "\u00A77: Place portal block");
|
||||
sender.sendMessage(Lang.translate("messageprefix.positive") + Lang.translate("command.portalblock"));
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,6 @@ public class RemoveSubCommand implements SubCommand {
|
||||
@Override
|
||||
public void onCommand(CommandSenderContainer sender, String[] args) {
|
||||
if(args.length > 1) {
|
||||
// TODO sort portal services
|
||||
if(portalServices.removePortal(args[1], sender.getPlayerContainer())) {
|
||||
sender.sendMessage(Lang.translate("messageprefix.positive") + Lang.translate("command.remove.complete"));
|
||||
}
|
||||
|
@ -25,8 +25,12 @@ public class SelectorSubCommand implements SubCommand {
|
||||
sender.sendMessage(Lang.translate("messageprefix.negative") + Lang.translate("command.playeronly"));
|
||||
}
|
||||
else {
|
||||
player.giveItem(configRepo.getSelectorMaterial(), "\u00A7ePortal Region Selector"
|
||||
, "\u00A7rThis wand with has the power to help", "\u00A7r create portals bistowed upon it!");
|
||||
player.giveItem(configRepo.getSelectorMaterial(), "\u00A7e" + Lang.translate("items.selector.name")
|
||||
, "\u00A7r\u00A77This wand with has the power to help",
|
||||
"\u00A7r\u00A77 create portals bistowed upon it!",
|
||||
"",
|
||||
"\u00A7r\u00A7e" + Lang.translate("items.interact.left") + "\u00A77: " + Lang.translateInsertVariables("items.selector.pos", "1"),
|
||||
"\u00A7r\u00A7e" + Lang.translate("items.interact.right") + "\u00A77: " + Lang.translateInsertVariables("items.selector.pos", "2"));
|
||||
sender.sendMessage(Lang.translate("messageprefix.positive") + Lang.translate("command.selector"));
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,5 @@ public interface PlayerContainer {
|
||||
*/
|
||||
void sendFakeBlockWithData(BlockLocation blockPos, String material, byte data);
|
||||
|
||||
void giveWool(String dyeColor, String itemName, String... itemDescription);
|
||||
|
||||
void giveItem(String material, String itemName, String... itemDescription);
|
||||
}
|
||||
|
@ -8,7 +8,6 @@ import com.sekwah.advancedportals.core.portal.AdvancedPortal;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -76,7 +76,7 @@ command.create.tags=&aTags:
|
||||
command.playeronly= Sorry but that command can only be run by a player.
|
||||
|
||||
command.remove.noname= You need to give the name of the portal you want to remove.
|
||||
command.remove.error= Removing the portal was blocked:
|
||||
command.remove.error= There was a problem removing the portal:
|
||||
command.remove.noname=No portal by that name was found
|
||||
command.remove.invalidselection=The portal selection you had is no longer valid
|
||||
command.remove.noselection=You don't have a portal selected
|
||||
@ -109,8 +109,13 @@ error.notplayer=Only players can do that.
|
||||
|
||||
portal.selector.poschange=&eYou have selected pos%1$s X:%2$s Y:%3$s Z:%4$s
|
||||
|
||||
command.trans.help=Copy translation new default translation file
|
||||
command.lang.help=Update the translation file
|
||||
|
||||
command.version.help=Returns the current version of the plugin
|
||||
|
||||
command.subcommand.nopermission= Sorry but you don't have permission for that, please use &e/%1$s help &cif you would like a list of possible sub commands.
|
||||
|
||||
items.selector.name=Portal Region Selector
|
||||
items.selector.pos=Select pos %1$s
|
||||
items.interact.left=Left Click
|
||||
items.interact.right=Right Click
|
||||
|
@ -19,7 +19,8 @@ dependencies {
|
||||
implementation "org.spigotmc:spigot-api:1.16.1-R0.1-SNAPSHOT"
|
||||
implementation "net.md-5:bungeecord-api:1.16-R0.4"
|
||||
implementation group: 'com.google.inject', name: 'guice', version:'5.0.1'
|
||||
compileOnly 'com.destroystokyo.paper:paper-api:1.16.5-R0.1-SNAPSHOT'
|
||||
// Be careful to only use what you need to from paper, otherwise it will become incompatible with spigot.
|
||||
//compileOnly 'com.destroystokyo.paper:paper-api:1.16.5-R0.1-SNAPSHOT'
|
||||
}
|
||||
|
||||
jar {
|
||||
|
@ -83,15 +83,6 @@ public class SpigotPlayerContainer implements PlayerContainer {
|
||||
|
||||
}
|
||||
|
||||
public void giveWool(String dyeColor, String itemName, String... itemDescription) {
|
||||
ItemStack regionselector = new Wool(DyeColor.valueOf(dyeColor)).toItemStack(1);
|
||||
ItemMeta selectorname = regionselector.getItemMeta();
|
||||
selectorname.setDisplayName(itemName);
|
||||
selectorname.setLore(Arrays.asList(itemDescription));
|
||||
regionselector.setItemMeta(selectorname);
|
||||
this.player.getInventory().addItem(regionselector);
|
||||
}
|
||||
|
||||
public void giveItem(String material, String itemName, String... itemDescription) {
|
||||
ItemStack regionselector = new ItemStack(Material.getMaterial(material));
|
||||
ItemMeta selectorname = regionselector.getItemMeta();
|
||||
|
Loading…
Reference in New Issue
Block a user