QUOTE: Life is a journey, not a destination.

Changed warp command messages - poppy - A feature-rich Minecraft plugin which enhances gaming experience

poppy

A feature-rich Minecraft plugin which enhances gaming experience
git clone git://192.168.2.2/poppy
Log | Files | Refs | README

commit 55b896c52b2f55c70629d342adf9270ebf2098da
parent 2933e22773ece32791406c2e9ae97b1715d4b5e5
Author: typable <contact@typable.dev>
Date:   Fri, 13 Jan 2023 21:57:08 +0100

Changed warp command messages

Diffstat:
Msrc/poppy/Main.java | 18+++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/poppy/Main.java b/src/poppy/Main.java @@ -225,18 +225,18 @@ public class Main extends JavaPlugin return false; } - final String name = args[0]; - final Location location = config.getWarp(name.toLowerCase()); + final String name = args[0].toLowerCase(); + final Location location = config.getWarp(name); if(location == null) { - player.sendMessage(ChatColor.RED + "Warp point " + name + " doesn't exist!"); + player.sendMessage(ChatColor.RED + "Warppoint " + name + " doesn't exist!"); return true; } if(Utils.travelTo(plugin, player, location)) { - player.sendMessage(ChatColor.GRAY + "You've been teleported to warp point " + name + "."); + player.sendMessage(ChatColor.GRAY + "You've been teleported to warppoint " + name + "."); } return true; @@ -264,23 +264,23 @@ public class Main extends JavaPlugin return false; } - final String name = args[0]; + final String name = args[0].toLowerCase(); if(!Utils.payFee(player, Material.COMPASS, 1)) { - player.sendMessage(ChatColor.RED + "The fee for creating a warp point is 1 compass!"); + player.sendMessage(ChatColor.RED + "The fee for creating a warppoint is 1 compass!"); return true; } try { - if(!config.setWarp(name.toLowerCase(), player.getLocation())) + if(!config.setWarp(name, player.getLocation())) { - player.sendMessage(ChatColor.RED + "Warp point " + name + " already exists!"); + player.sendMessage(ChatColor.RED + "Warppoint " + name + " already exists!"); return true; } - player.sendMessage(ChatColor.YELLOW + "Warp point " + name + " set."); + player.sendMessage(ChatColor.YELLOW + "Warppoint " + name + " set."); } catch(Exception ex) {