Harigami
ログイン
12
anonymous タイトルなし
PHP
function changeLinkTarget() {
// target="_blank" で、relに noopener か noreferrer がない場合はそれぞれ追加する
echo <<< EOM
<script>
var linkTag = document.getElementsByTagName('a');
for (var i = 0; i < linkTag.length; i++) {
  if (linkTag[i].target == '_blank') {
    var new_rel = linkTag[i].rel;
    if (linkTag[i].rel.match(/noopener/) == null) {
	  new_rel += ' noopener';
	}
	if (linkTag[i].rel.match(/noreferrer/) == null) {
	  new_rel += ' noreferrer';
	}
    linkTag[i].setAttribute('rel', new_rel);
  }
}
</script>
EOM;
}
add_action('wp_footer', 'changeLinkTarget');
  • 0
  • 0
anonymous タイトルなし
PHP
<?php
/**
 * The Header template for our theme
 *
 * Displays all of the <head> section and everything up till <div id="main">
 *
 * @package WordPress
 * @subpackage Twenty_Twelve
 * @since Twenty Twelve 1.0
 */
?><!DOCTYPE html>
<!--[if IE 7]>
<html class="ie ie7" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html class="ie ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 7) & !(IE 8)]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]-->
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width" />
<title><?php wp_title( '|', true, 'right' ); ?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php echo esc_url( get_bloginfo( 'pingback_url' ) ); ?>">
<?php // Loads HTML5 JavaScript file to add support for HTML5 elements in older IE versions. ?>
<!--[if lt IE 9]>
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
<![endif]-->
<?php wp_head(); ?>
</head>

<body <?php body_class(); ?>>
	
<?php wp_body_open(); ?>
<div id="page" class="hfeed site">
	<header id="masthead" class="site-header" role="banner">
		<hgroup>
			<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
			<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
		</hgroup>

		<nav id="site-navigation" class="main-navigation" role="navigation">
			<button class="menu-toggle"><?php _e( 'Menu', 'twentytwelve' ); ?></button>
			<a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentytwelve' ); ?>"><?php _e( 'Skip to content', 'twentytwelve' ); ?></a>
			<?php
			wp_nav_menu(
				array(
					'theme_location' => 'primary',
					'menu_class'     => 'nav-menu',
				)
			);
			?>
		</nav><!-- #site-navigation -->

		<?php if ( get_header_image() ) : ?>
		<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php header_image(); ?>" class="header-image" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" /></a>
		<?php endif; ?>
	</header><!-- #masthead -->

	<div id="main" class="wrapper">
  • 0
  • 1
anonymous 簡易検索ロジック
PHP
<?php

    $dsn = 'mysql:dbname=DB名;host=localhost;charset=utf8';
    $user = 'root';
    $password = '';
    $dbh = new PDO($dsn,$user,$password);
    $dbh->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);

    if(isset($_GET['namesearch'])){
      $namesearch = $_GET['namesearch'];
    }else{
      $namesearch = '';
    }
    if(isset($_GET['codesearch'])){
      $codesearch = $_GET['codesearch'];
    }else{
      $codesearch = '';
    }

    $sql = 'SELECT code,name FROM テーブル名 WHERE code LIKE "%'.$codesearch.'%" AND name LIKE "%'.$namesearch.'%"';

    $stmt = $dbh->prepare($sql);
    $stmt->execute();

    $dbh = null;

    echo '<form method="get">';
    echo '<input type="text" placeholder="No." name="codesearch" value="'.$codesearch.'">';
    echo '<input type="text" placeholder="氏名" name="namesearch" value="'.$namesearch.'">';
    echo '<input type="submit" value="検索">';
    echo '</form>';

    echo '一覧<br/><br/>';

    while(true){
      $rec = $stmt->fetch(PDO::FETCH_ASSOC);
      if($rec == false){
        break;
      }
      echo $rec['code'].'.';
      echo $rec['name'];
      echo '<br/>';
    }

?>
  • 0
  • 1
anonymous 簡易検索ロジック
PHP
<?php

    $dsn = 'mysql:dbname=DB名;host=localhost;charset=utf8';
    $user = 'root';
    $password = '';
    $dbh = new PDO($dsn,$user,$password);
    $dbh->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);

    if(isset($_GET['namesearch'])){
      $namesearch = $_GET['namesearch'];
    }else{
      $namesearch = '';
    }
    if(isset($_GET['codesearch'])){
      $codesearch = $_GET['codesearch'];
    }else{
      $codesearch = '';
    }

    $sql = 'SELECT code,name FROM テーブル名 WHERE code LIKE "%'.$codesearch.'%" AND name LIKE "%'.$namesearch.'%"';

    $stmt = $dbh->prepare($sql);
    $stmt->execute();

    $dbh = null;

    echo '<form method="get">';
    echo '<input type="text" placeholder="No." name="codesearch" value="'.$codesearch.'">';
    echo '<input type="text" placeholder="氏名" name="namesearch" value="'.$namesearch.'">';
    echo '<input type="submit" value="検索">';
    echo '</div></div>';
    echo '</form>';

    echo '一覧<br/><br/>';

    while(true){
      $rec = $stmt->fetch(PDO::FETCH_ASSOC);
      if($rec == false){
        break;
      }
      echo $rec['code'].'.';
      echo $rec['name'];
      echo '<br/>';
    }

?>
  • 0
  • 1
anonymous タイトルなし
PHP
💩
  • 0
  • 0
anonymous タイトルなし
PHP
<?php

namespace tatchan\selfwarp;

use pocketmine\command\Command;
use pocketmine\command\CommandSender;
use pocketmine\event\Listener;
use pocketmine\level\Level;
use pocketmine\level\Position;
use pocketmine\math\Vector3;
use pocketmine\plugin\PluginBase;
use pocketmine\utils\Config;
use pocketmine\Player;
use pocketmine\Server;
class Main extends PluginBase{
const TAG = "§f[§aSelfWarp§f]";
	public function onEnable() : void{
		$this->Config = new Config($this->getDataFolder() . "Config.yml", Config::YAML, array(
            "Pay" => 300,
        ));
	}

	public function onCommand(CommandSender $sender, Command $command, string $label, array $args) : bool{
		switch($command->getName()){
			case "selfwarp":
			if(!$sender instanceof Player){
					$sender->sendMessage("§6>>§cゲーム内で実行してください");
				}else{

				if(!isset($args[0])){
					$sender->sendMessage(self::TAG."/selfwarp help");
					return false;
					}else{
						if($args[0] == "add"){
							if(!isset($args[1])){
                            $sender->sendMessage(self::TAG."/selfwarp add <ワープ地点名>");
                        }else{
                        	$player = $sender;
                        	 $x = $sender->x;
                            $y = $sender->y;
                            $z = $sender->z;
                            $level = $sender->getLevel()->getName();
                            if(!$this->Config->exists($args[1])){
                            	$warpname = $args[1];
            $this->Config->set($warpname, array(
                "x"=>$x,
                "y"=>$y,
                "z"=>$z,
                "level"=>$level,
                "player"=>$player,
                "metadata"=>array()
            ));
            $this->Config->save();
							
						}else{
							$sender->sendMessage(self::TAG."§6>>もう既に存在します");
						}
					}
                        }
					}
				}
				if($args[0] == "help"){
                        $sender->sendMessage(self::TAG."/selfwarp < add | warp > [Option]");
                        return false;
                    }
    
                default:
                return false;
            }
        }



	public function onDisable() : void{
		$this->getLogger()->info("Bye");
	}
}
  • 0
  • 1
anonymous タイトルなし
PHP
logoHarigami
ログイン
 anonymous タイトルなし No License PHP
 コピー
<?php
namespace smo\WarnSystem;
use pocketmine\plugin\PluginBase;
use pocketmine\command\CommandSender;
use pocketmine\command\Command;
use pocketmine\event\Listener;
use pocketmine\event\player\PlayerJoinEvent;
use pocketmine\Player;
use pocketmine\utils\Config;
class Main extends PluginBase implements Listener{
	/*
	 * Config保存の方法:
	 *
	 * ・N === 警告なし
	 * ・1 === 警告一個 (⚠)
	 * ・2 === 警告二個 (⚠⚠)
	 * ・3 === 警告三個 (⚠⚠⚠)
	 */
	private function setWarnTag(Player $player, WarnPoint $p) :void{
		switch($p){
			case 1:
			$player->setNameTag("§c⚠§r".$name);
			$player->setDisplayName("§c⚠§r".$name);
			$player->save();
			break;
			case 2:
			$player->setNameTag("§c⚠⚠§r".$name);
			$player->setDisplayName("§c⚠⚠§r".$name);
			$player->save();
			break;
			case 3:
			$player->setNameTag("§c⚠⚠⚠§r".$name);
			$player->setDisplayName("§c⚠⚠⚠§r".$name);
			$player->save();
			break;
		}
	}
	public function onEnable() :void{
		$this->getLogger()->notice("WarnSystemを読み込みました by smo");
		$this->getServer()->getPluginManager()->registerEvents($this, $this);
		if(!file_exists($this->getDataFolder())) @mkdir($this->getDataFolder(), 0744, true);
						$this->c = new Config($this->getDataFolder() . "config.yml", Config::YAML);
	}
	/**
 * @priority MONITOR
 */
	public function onJoin(PlayerJoinEvent $event) :void{
		$player = $event->getPlayer();
		$name = $event->getPlayer()->getName();
		if(!$this->c->exists($name)) {
			$this->c->set($name, "N");
			$this->c->save();
		}else{
			switch($this->c->get($name)){
				case "N":
				break;
				case "1":
				$this->setWarnTag($player, 1);
				break;
				case "2":
				$this->setWarnTag($player, 2);
				break;
				case "3":
				$this->setWarnTag($player, 3);
				break;
			}
		}
		public function onCommand(CommandSender $sender, Command $command, string $label, array $args) : bool{
			switch($command->getName()){
				case "checkwarn":
				if(!$sender instanceof Player){
					$sender->sendMessage("§6>>§cゲーム内で実行してください");
				}else{
					switch($this->c->get($sender->getName())){
						case "N":
						$sender->sendMessage("§6>>§aあなたは警告されていません");
						break;
						case "1":
						$sender->sendMessage("§6>>§cあなたな累積警告は§e1§cです");
						break;
						case "2":
						$sender->sendMessage("§6>>§cあなたな累積警告は§e2§cです");
						break;
						case "3":
						$sender->sendMessage("§6>>§cあなたな累積警告は§e3§cです");
						break;
					}
				}
				break;
				case "warn":
				if(!isset($args[0])) return false;
				if(!issrt($args[1])) return false;
				switch($args[0]){
					case "add":
					if(!$this->c->exists($args[1])){
						$sender->sendMessage("§6>>§e".$args[1]."§cのデータがありません");
					}elseif($this->c->get($args[1]) === "N"){
						$sender->sendMessage("§6>>§e".$args[1]."§aの累積警告を§e1§aにしました");
						$this->c->set($args[1], "1");
						$this->c->save();
					}elseif($this->c->get($args[1]) === "1"){
						$sender->sendMessage("§6>>§e".$args[1]."§aの累積警告を§e2§aにしました");
						$this->c->set($args[1], "2");
						$this->c->save();
					}elseif($this->c->get($args[1]) === "2"){
						$sender->sendMessage("§6>>§e".$args[1]."§aの累積警告を§e3§aにしました");
						$this->c->set($args[1], "3");
						$this->c->save();
					}elseif($this->c->get($args[1]) === "3"){
						$sender->sendMessage("§6>>§e".$args[1]."§cの累積警告は既に最大値です");
					}
					break;
					case "remove":
					if(!$this->c->exists($args[1])){
						$sender->sendMessage("§6>>§e".$args[1]."§cのデータがありません");
					}elseif($this->c->get($args[1]) === "N"){
						$sender->sendMessage("§6>>§e".$args[1]."§cは警告されていません");
					}elseif($this->c->get($args[1]) === "1"){
						$sender->sendMessage("§6>>§e".$args[1]."§aの累積警告を取り消しました");
						$this->c->set($args[1], "N");
						$this->c->save();
					}elseif($this->c->get($args[1]) === "2"){
						$sender->sendMessage("§6>>§e".$args[1]."§aの累積警告を§e1§aにしました");
						$this->c->set($args[1], "1");
						$this->c->save();
					}elseif($this->c->get($args[1]) === "3"){
						$sender->sendMessage("§6>>§e".$args[1]."§aの累積警告を§e2§aにしました");
						$this->c->set($args[1], "2");
						$this->c->save();
					}
					break;
					case "check":
					if(!$this->c->exists($args[1])){
						$sender->sendMessage("§6>>§e".$args[1]."§cのデータがありません");
					}elseif($this->c->get($args[1]) === "N"){
						$sender->sendMessage("§6>>§e".$args[1]."§aの累積警告:§eなし");
					}elseif($this->c->get($args[1]) === "1"){
						$sender->sendMessage("§6>>§e".$args[1]."§aの累積警告:§e1");
					}elseif($this->c->get($args[1]) === "2"){
						$sender->sendMessage("§6>>§e".$args[1]."§aの累積警告:§e2");
					}elseif($this->c->get($args[1]) === "3"){
						$sender->sendMessage("§6>>§e".$args[1]."§aの累積警告:§e3");
					}
					break;
				}
				break;
			}
			return true;
		}
	}
}

  • 0
  • 1
anonymous タイトルなし
PHP
logoHarigami
ログイン
 anonymous タイトルなし No License PHP
 コピー
<?php
namespace smo\WarnSystem;
use pocketmine\plugin\PluginBase;
use pocketmine\command\CommandSender;
use pocketmine\command\Command;
use pocketmine\event\Listener;
use pocketmine\event\player\PlayerJoinEvent;
use pocketmine\Player;
use pocketmine\utils\Config;
class Main extends PluginBase implements Listener{
	/*
	 * Config保存の方法:
	 *
	 * ・N === 警告なし
	 * ・1 === 警告一個 (⚠)
	 * ・2 === 警告二個 (⚠⚠)
	 * ・3 === 警告三個 (⚠⚠⚠)
	 */
	private function setWarnTag(Player $player, WarnPoint $p) :void{
		switch($p){
			case 1:
			$player->setNameTag("§c⚠§r".$name);
			$player->setDisplayName("§c⚠§r".$name);
			$player->save();
			break;
			case 2:
			$player->setNameTag("§c⚠⚠§r".$name);
			$player->setDisplayName("§c⚠⚠§r".$name);
			$player->save();
			break;
			case 3:
			$player->setNameTag("§c⚠⚠⚠§r".$name);
			$player->setDisplayName("§c⚠⚠⚠§r".$name);
			$player->save();
			break;
		}
	}
	public function onEnable() :void{
		$this->getLogger()->notice("WarnSystemを読み込みました by smo");
		$this->getServer()->getPluginManager()->registerEvents($this, $this);
		if(!file_exists($this->getDataFolder())) @mkdir($this->getDataFolder(), 0744, true);
						$this->c = new Config($this->getDataFolder() . "config.yml", Config::YAML);
	}
	/**
 * @priority MONITOR
 */
	public function onJoin(PlayerJoinEvent $event) :void{
		$player = $event->getPlayer();
		$name = $event->getPlayer()->getName();
		if(!$this->c->exists($name)) {
			$this->c->set($name, "N");
			$this->c->save();
		}else{
			switch($this->c->get($name)){
				case "N":
				break;
				case "1":
				$this->setWarnTag($player, 1);
				break;
				case "2":
				$this->setWarnTag($player, 2);
				break;
				case "3":
				$this->setWarnTag($player, 3);
				break;
			}
		}
		public function onCommand(CommandSender $sender, Command $command, string $label, array $args) : bool{
			switch($label){
				case "checkwarn":
				if(!$sender instanceof Player){
					$sender->sendMessage("§6>>§cゲーム内で実行してください");
				}else{
					switch($this->c->get($sender->getName())){
						case "N":
						$sender->sendMessage("§6>>§aあなたは警告されていません");
						break;
						case "1":
						$sender->sendMessage("§6>>§cあなたな累積警告は§e1§cです");
						break;
						case "2":
						$sender->sendMessage("§6>>§cあなたな累積警告は§e2§cです");
						break;
						case "3":
						$sender->sendMessage("§6>>§cあなたな累積警告は§e3§cです");
						break;
					}
				}
				break;
				case "warn":
				if(!isset($args[0])) return false;
				if(!issrt($args[1])) return false;
				switch($args[0]){
					case "add":
					if(!$this->c->exists($args[1])){
						$sender->sendMessage("§6>>§e".$args[1]."§cのデータがありません");
					}elseif($this->c->get($args[1]) === "N"){
						$sender->sendMessage("§6>>§e".$args[1]."§aの累積警告を§e1§aにしました");
						$this->c->set($args[1], "1");
						$this->c->save();
					}elseif($this->c->get($args[1]) === "1"){
						$sender->sendMessage("§6>>§e".$args[1]."§aの累積警告を§e2§aにしました");
						$this->c->set($args[1], "2");
						$this->c->save();
					}elseif($this->c->get($args[1]) === "2"){
						$sender->sendMessage("§6>>§e".$args[1]."§aの累積警告を§e3§aにしました");
						$this->c->set($args[1], "3");
						$this->c->save();
					}elseif($this->c->get($args[1]) === "3"){
						$sender->sendMessage("§6>>§e".$args[1]."§cの累積警告は既に最大値です");
					}
					break;
					case "remove":
					if(!$this->c->exists($args[1])){
						$sender->sendMessage("§6>>§e".$args[1]."§cのデータがありません");
					}elseif($this->c->get($args[1]) === "N"){
						$sender->sendMessage("§6>>§e".$args[1]."§cは警告されていません");
					}elseif($this->c->get($args[1]) === "1"){
						$sender->sendMessage("§6>>§e".$args[1]."§aの累積警告を取り消しました");
						$this->c->set($args[1], "N");
						$this->c->save();
					}elseif($this->c->get($args[1]) === "2"){
						$sender->sendMessage("§6>>§e".$args[1]."§aの累積警告を§e1§aにしました");
						$this->c->set($args[1], "1");
						$this->c->save();
					}elseif($this->c->get($args[1]) === "3"){
						$sender->sendMessage("§6>>§e".$args[1]."§aの累積警告を§e2§aにしました");
						$this->c->set($args[1], "2");
						$this->c->save();
					}
					break;
					case "check":
					if(!$this->c->exists($args[1])){
						$sender->sendMessage("§6>>§e".$args[1]."§cのデータがありません");
					}elseif($this->c->get($args[1]) === "N"){
						$sender->sendMessage("§6>>§e".$args[1]."§aの累積警告:§eなし");
					}elseif($this->c->get($args[1]) === "1"){
						$sender->sendMessage("§6>>§e".$args[1]."§aの累積警告:§e1");
					}elseif($this->c->get($args[1]) === "2"){
						$sender->sendMessage("§6>>§e".$args[1]."§aの累積警告:§e2");
					}elseif($this->c->get($args[1]) === "3"){
						$sender->sendMessage("§6>>§e".$args[1]."§aの累積警告:§e3");
					}
					break;
				}
				break;
			}
			return true;
		}
	}
}

  • 0
  • 0
anonymous タイトルなし
PHP
<?php

namespace smo\WarnSystem;

use pocketmine\plugin\PluginBase;

use pocketmine\command\CommandSender;
use pocketmine\command\Command;

use pocketmine\event\Listener;
use pocketmine\event\player\PlayerJoinEvent;

use pocketmine\Player;

use pocketmine\utils\Config;

class Main extends PluginBase implements Listener{

	/*
	 * Config保存の方法:
	 *
	 * ・N === 警告なし
	 * ・1 === 警告一個 (⚠)
	 * ・2 === 警告二個 (⚠⚠)
	 * ・3 === 警告三個 (⚠⚠⚠)
	 */

	private function setWarnTag(Player $player, WarnPoint $p) :void{
		switch($p){
			case 1:
			$player->setNameTag("§c⚠§r".$name);
			$player->setDisplayName("§c⚠§r".$name);
			$player->save();
			break;
			case 2:
			$player->setNameTag("§c⚠⚠§r".$name);
			$player->setDisplayName("§c⚠⚠§r".$name);
			$player->save();
			break;
			case 3:
			$player->setNameTag("§c⚠⚠⚠§r".$name);
			$player->setDisplayName("§c⚠⚠⚠§r".$name);
			$player->save();
			break;
		}
	}

	public function onEnable() :void{
		$this->getLogger()->notice("WarnSystemを読み込みました by smo");
		$this->getServer()->getPluginManager()->registerEvents($this, $this);
		if(!file_exists($this->getDataFolder())) @mkdir($this->getDataFolder(), 0744, true);
						$this->c = new Config($this->getDataFolder() . "config.yml", Config::YAML);
	}

	/**
 * @priority MONITOR
 */
	public function onJoin(PlayerJoinEvent $event) :void{
		$player = $event->getPlayer();
		$name = $event->getPlayer()->getName();
		if(!$this->c->exists($name)) {
			$this->c->set($name, "N");
			$this->c->save();
		}else{
			switch($this->c->get($name)){
				case "N":
				break;
				case "1":
				$this->setWarnTag($player, 1);
				break;
				case "2":
				$this->setWarnTag($player, 2);
				break;
				case "3":
				$this->setWarnTag($player, 3);
				break;
			}
		}

		public function onCommand(CommandSender $sender, Command $command, String $label, array $args) :bool{
			switch($label){
				case "checkwarn":
				if(!$sender instanceof Player){
					$sender->sendMessage("§6>>§cゲーム内で実行してください");
				}else{
					switch($this->c->get($sender->getName())){
						case "N":
						$sender->sendMessage("§6>>§aあなたは警告されていません");
						break;
						case "1":
						$sender->sendMessage("§6>>§cあなたな累積警告は§e1§cです");
						break;
						case "2":
						$sender->sendMessage("§6>>§cあなたな累積警告は§e2§cです");
						break;
						case "3":
						$sender->sendMessage("§6>>§cあなたな累積警告は§e3§cです");
						break;
					}
				}
				break;
				case "warn":
				if(!isset($args[0])) return false;
				if(!issrt($args[1])) return false;
				switch($args[0]){
					case "add":
					if(!$this->c->exists($args[1])){
						$sender->sendMessage("§6>>§e".$args[1]."§cのデータがありません");
					}elseif($this->c->get($args[1]) === "N"){
						$sender->sendMessage("§6>>§e".$args[1]."§aの累積警告を§e1§aにしました");
						$this->c->set($args[1], "1");
						$this->c->save();
					}elseif($this->c->get($args[1]) === "1"){
						$sender->sendMessage("§6>>§e".$args[1]."§aの累積警告を§e2§aにしました");
						$this->c->set($args[1], "2");
						$this->c->save();
					}elseif($this->c->get($args[1]) === "2"){
						$sender->sendMessage("§6>>§e".$args[1]."§aの累積警告を§e3§aにしました");
						$this->c->set($args[1], "3");
						$this->c->save();
					}elseif($this->c->get($args[1]) === "3"){
						$sender->sendMessage("§6>>§e".$args[1]."§cの累積警告は既に最大値です");
					}
					break;
					case "remove":
					if(!$this->c->exists($args[1])){
						$sender->sendMessage("§6>>§e".$args[1]."§cのデータがありません");
					}elseif($this->c->get($args[1]) === "N"){
						$sender->sendMessage("§6>>§e".$args[1]."§cは警告されていません");
					}elseif($this->c->get($args[1]) === "1"){
						$sender->sendMessage("§6>>§e".$args[1]."§aの累積警告を取り消しました");
						$this->c->set($args[1], "N");
						$this->c->save();
					}elseif($this->c->get($args[1]) === "2"){
						$sender->sendMessage("§6>>§e".$args[1]."§aの累積警告を§e1§aにしました");
						$this->c->set($args[1], "1");
						$this->c->save();
					}elseif($this->c->get($args[1]) === "3"){
						$sender->sendMessage("§6>>§e".$args[1]."§aの累積警告を§e2§aにしました");
						$this->c->set($args[1], "2");
						$this->c->save();
					}
					break;
					case "check":
					if(!$this->c->exists($args[1])){
						$sender->sendMessage("§6>>§e".$args[1]."§cのデータがありません");
					}elseif($this->c->get($args[1]) === "N"){
						$sender->sendMessage("§6>>§e".$args[1]."§aの累積警告:§eなし");
					}elseif($this->c->get($args[1]) === "1"){
						$sender->sendMessage("§6>>§e".$args[1]."§aの累積警告:§e1");
					}elseif($this->c->get($args[1]) === "2"){
						$sender->sendMessage("§6>>§e".$args[1]."§aの累積警告:§e2");
					}elseif($this->c->get($args[1]) === "3"){
						$sender->sendMessage("§6>>§e".$args[1]."§aの累積警告:§e3");
					}
					break;
				}
				break;
			}
			return true;
		}
}
}
  • 0
  • 0
anonymous タイトルなし
PHP
ああ
  • 0
  • 0
あなたもコードを投稿しませんか?
投稿する
12